Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
SQL Query
SharePoint Interview
general knowledge
 :) Hot Jobs
 :) Latest Articles


Difference between IQueryable and IEnumerable
Classified Posted on 12 Mar 2019

Home >> DotNet >> C# >> Difference between IQueryable and IEnumerable

Difference between IQueryable and IEnumerable
There are mainly 4 difference in IQueryable and IEnumberable. Below are the points for the same
(1)IEnumerable Namespace is System.Collections and for IQueryable is is in System.Linq Namespace.
(2)IEnumerable is usefull where we need to do query from in-memory collections for example List, Array and so on. On the other hand IQueryable is usefull where querying data from out-memory for example remote database, service collections.
(3)When doing query in IEnumerable it will firs excute Select Query and load all the data in memory and then apply filter on it is inMemory concept suitable for short data will becaome solw if data is huge. On the other hand Iqueryable is suitable where data is taken in outMemory and all filter should be apply on the server for example Remote Database and Service.
(4)IEnumerable is usefull for LINQ to Object and LINQ to XML queries on the other hand IQueryable is beneficial for LINQ to SQL queries.

Other Important Questions
C#.Net Reserve Words
Code to get sum of given digit up to level one
can we inherit private class level variables in c#
what is multicast delegate
Difference between struct and class

Top Searches:asp net questions vb net questions sql query uddl questions class javascript sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |