Difference between ienumerable and iqueryable

Posted by Muhsinathk under ASP.NET on 9/18/2012 | Points: 10 | Views : 1155 | Status : [Member] | Replies : 4
Hi,
What is the difference between ienumerable and iqueryable?




Responses

Posted by: Vikash on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
The primary difference is that the extension methods defined for IQueryable<T> take Expression objects instead of Functional objects, meaning the delegate it receives is an expression tree instead of a method to invoke.

IEnumerable<T> is great for working with in-memory collections, but IQueryable<T> allows for a remote data source, like a database or web service.

IEnumerable doesn't have the concept of moving between items, it is a forward only collection. It's very minimalistic; something that most any data source can provide. Using only this minimal functionality, LINQ can provide all of these great operators.

IQueryable<T> is a very powerful feature that enables a variety of interesting deferred execution scenarios (like paging and composition based queries).

Hope this helps !!!

else follow the link below...
http://michaelmairegger.wordpress.com/2011/08/07/ienumerable-vs-iqueryable/
mark as answer, if got helpful............

Regards,
Vikash Pathak

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 25

Up
0
Down
Thank you Vikash

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vikash on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
Plz mark as answer..... i think that will be more thankful for other and me............

Regards,
Vikash Pathak

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
Nice Explanation Vikash

Thanks & Regards
Hari

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response