Returning IEnumerable<T> vs IQueryable<T>
- by stackoverflowuser
what is the difference between returning iqueryable vs ienumerable.
IQueryable<Customer> custs = from c in db.Customers
where c.City == "<City>"
select c;
IEnumerable<Customer> custs = from c in db.Customers
where c.City == "<City>"
select c;
Will both be deferred execution? When should one be preferred over the other?