Result set returns empty and i'm getting that error 'Enumeration yielded no results' when i use Where clause(LINQ) . What could be problem?
public class Stores
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int StoreId { get; set; }
public string StoreName { get; set; }
public string Address { get; set; }
public string Telephone { get; set; }
public int TownId { get; set; }
}
public DbSet<Stores> Store { get; set; }
var storeList = from n in db.Store
where n.TownId == 10
select n;