Using IQueryable with Linq
What is the use of IQueryable in the context of LINQ? Is it used for developing extension methods or any other purpose? 4 Answers 4
What is the use of IQueryable in the context of LINQ? Is it used for developing extension methods or any other purpose? 4 Answers 4
What is the difference between IQueryable<T> and IEnumerable<T>? See also What’s the difference between IQueryable and IEnumerable that overlaps with this question. 12 Answers 12
I found an example in the VS2008 Examples for Dynamic LINQ that allows you to use a SQL-like string (e.g. OrderBy(“Name, Age DESC”)) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>? 22 s 22 Just stumbled into this oldie… To do this without … Read more
What is the difference between returning IQueryable<T> vs. IEnumerable<T>, when should one be preferred over the other? 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 and when should one be preferred over … Read more