What is the difference between Enumerable and Queryable?

  • Thread starter Alexander Vasilevsky
  • Start date
J

Jon Skeet [C# MVP]

What is the difference between Enumerable and Queryable?

Broadly, Enumerable provides extension methods for IEnumerable<T>.
Queryable provides extension methods for IQuerable<T>.

IEnumerable<T> is used for LINQ to Objects, whereas IQueryable<T> is
designed for LINQ providers which need to translate expression trees
into other forms - web service calls, SQL, LDAP etc.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top