IEnumerable Vs IQueryable?
samba siva
Ienumerable fetches the entire data from the database.It fetches the record one by one.It can Read , but cannot modify and update the data.It is the forward only data,we cannot insert the items at the middle.IQueryable : IQueryable fetches the Record based on filter wise. IQueryable is faster than IEnumerable.
In addition to Munesh Sharma's answer:IEnumerable loads data in-memory and then apply filters to it one by one but IQueryable apply filters all at once and return the result.
http://www.codeproject.com/Articles/732425/IEnumerable-Vs-IQueryable
IEnumerable: IEnumerable is best suitable for working with in-memory collection (or local queries). IEnumerable doesn't move between items, it is forward only collection.IQueryable: IQueryable best suits for remote data source, like a database or web service (or remote queries). IQueryable is a very powerful feature that enables a variety of interesting deferred execution scenarios (like paging and composition based queries).So when you have to simply iterate through the in-memory collection, use IEnumerable, if you need to do any manipulation with the collection like Dataset and other data sources, use IQueryable
In case of IEnumerable, Return LINQ result list and thne execute condition But in IQuerable, which execute condition at the end and return the list
In case of IEnumerable, based on LINQ result I get the list But in IQuerable, I can have composite where conditions which get executed at the end and return the List