IQueryable vs. IEnumerable

  1. IQueryable<T> extends the IEnumerable<T> interface
  2. IEnumerable<T> is great for working with sequences that are iterated in-memory, but
  3. IQueryable<T> allows for out-of-memory things like a remote data source, such as a database or web service
  4. IEnumerable<T>: loads all data into memory then filter. IQueryable<T>: filter data then loads the data into memory
  5. Links: 
    1. https://www.dotnettricks.com/learn/linq/ienumerable-vs-iqueryable
    2. https://medium.com/@mohamedabdeen/iqueryable-vs-ienumerable-in-net-92a15a803da3

 

 

相關文章
相關標籤/搜索