C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
7
Reply
IEnumerable Vs IQueryable?
samba siva
11y
19k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
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.
satish kumar
10y
1
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.
Arunava Bhattacharjee
11y
1
http://www.codeproject.com/Articles/732425/IEnumerable-Vs-IQueryable
samba siva
11y
1
IEnumerable first fetch the data from database and then apply filter on it. IQueryable fetch the data with applied filter from data base. IEnumerable is useful with in memory collections like array ,arraylist IQueryable is usefull to fetch data from database
kajal rane
6y
0
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
Munesh Sharma
11y
0
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
Kuldeep Patel
11y
0
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
Pradeep Shet
11y
0
Message