Possible Duplicate:
What is the difference between IQueryable<T> and IEnumerable<T>?
I read so much about IQueryable and I still dont understand when to use what and what are IQueryableProvider’s methods used for.
My english isnt perfect so understanding that article is imposibol for me. http://blogs.msdn.com/b/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx
*Do not tell me to use IEnumerable for collections and IQueryable for sql becouse we can use each one to collections and sql.
An
IEnumerableis near enough the simplest interface for a collection that can be iterated over, like in aforeachloop.An
IQueryableis a query builder that holds a LINQ query that can be added to until you do something with the query that forces it to execute and return a collection.