When querying a database, I prefer using a IQueryable
because the request is sent when data are needed. I mean this
var users = (from user in db.Users select user ).AsQueryable();
//it doesn't load data yet until you write users.ToList(); or users.Count();
solved IEnumreable and IQueryable [duplicate]