There are some differences between an IEnumerable and an IQueryable that I have arranged in a table for easier comparison:
IEnumerable
IQueryable
IEnumerable belongs to System.Collections Namespace.
IQueryable belongs to System.Linq Namespace
It has no base interface
It derives from IEnumerable
does not support Lazy Loading.
Support Lazy Loading.
While querying data from the database, IEnumerable executes a select query on the server-side, load data in-memory on client-side and then filter data. Hence does more work and becomes slow.
While querying data from the database, IQueryable executes select queries on the server-side with all filters. Hence does less work and becomes fast.
It suitable for LINQ to Object and LINQ to XML queries
It is suitable for LINQ to SQL queries.
Doesn’t support Custom Query
Supports Custom Query using CreateQuery and Execute methods
Extension methods supported in IEnumerable takes functional objects.
There are some differences between an IEnumerable and an IQueryable that I have arranged in a table for easier comparison:
IEnumerable
IQueryable