I know I can use linq syntax on collections that implement IQueryable or IEnumerable.
Does IQueryable use lazy calaulation and optimization, while IEnumerable not?
Does optimization include reordering of the queries?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Linq on an
IEnumerableis using Linq to Objects – Linq on anIQueryableis using whatever the query provider has implemented for the standard query operators.For ORMs like Linq to SQL and Entity Framework i.e. that means translating your Linq query into the corresponding SQL query on the database – filtering etc. on the database is much preferred to moving all that data into memory as it will have much better performance.