Professional Documents
Culture Documents
http://www.codeproject.com/Articles/732425/IEnumerable-Vs-IQuery...
IEnumerable Vs IQueryable
Adarsh Chaurasia (Consultant|Mentor|Tech Savvy), 24 Feb 2014
CPOL
Many developers gets confused between IEnumerable and IQueryable. When it comes to writing code, both looks very
similar. However there are many difference between them which needs to be taken care of while writing code. Both have
some intended usability scenarios for which they are made. Below lis
Many developers gets confused between IEnumerable and IQueryable. When it comes to writing code, both looks very
similar. However there are many difference between them which needs to be taken care of while writing code. Both have
some intended usability scenarios for which they are made.
Below lists the differences between them based on their properties :
Namespace
Derives from
Deferred Execution
Lazy Loading
IEnumerable
System.Collections Namespace
No base interface
Supported
Not Supported
IQueryable
System.Linq Namespace
Derives from IEnumerable
Supported
Supported
Suitable for
Custom Query
Extension mehtod
parameter
When to use
Best Uses
In-memory traversal
Paging
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Share
About the Author
1 of 2
10/23/2014 11:41 AM
http://www.codeproject.com/Articles/732425/IEnumerable-Vs-IQuery...
I have 4.6+ years of experience in SaaS, SOA based Enterprise Web Application design and development using Microsoft
technology stack. I have mostly worked on Business layer, Data access layer, WCF, Entity Framework, Microsoft Application
Blocks, Search engines, APIs integration, Third party APIs/Product Research & Development.
I am a huge fan of Design Patterns. I also work as Software Consultant. I read/write blogs, help and learn from other
developers.
Follow on
2 of 2
10/23/2014 11:41 AM