IEnumerable vs. IQueryable
In LINQ, IEnumerable and IQueryable are used for evaluating queries against a specific database or collection. IQueryable implements IEnumerable.
IEnumerable
-
IEnumerableresides inSystem.Collections. -
It retrieves data from a data source, loads it on the client-server, and then filters it.
-
It is more suitable for collections like arrays, lists, etc.
-
It supports deferred executions; i.e., unnecessary query executions are avoided.
IQueryable
-
IQueryableresides inSystem.Linq. -
It retrieves the data from a data source on the client-server after filtering it.
-
It is more suitable for remote data sources.
-
It supports deferred executions;i.e., unnecessary query executions are avoided.
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved