Articles → CSHARP → Difference Between The Iqueryable And Ienumerable In C#

Difference Between The Iqueryable And Ienumerable In C#






Ienumerable


  1. IEnumerable interface exists in System.Collection namespace.
  2. IEnumerable is suitable for in-memory collections like array, list etc.
  3. IEnumerable loads all the data from the server and then filters the data.
  4. IEnumerable is suitable for LINQ to Object or LINQ to SQL.

Iqueryable


  1. IQueryable interface exists in System.LINQ namespace.
  2. IQueryable is suitable for remote databases and services.
  3. IQueryable filters the data from the server and then loads the data.
  4. IQueryable is suitable for LINQ to SQL.



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, February 24, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250