I have Store Model that I want to return null if my model is null.
public Store Details() => db.Store.Single(s => s.Id == 1);
This query sometimes return a value and sometimes returns null. How can I specific the return type to include both?
Try to use
public Store Details() => db.Store.FirstOrDefault(s => s.Id == 1);