IEnumerable and IQueryable, both are interfaces to a .NET collection
IQueryable is Subset of IEnumerable and inheritance IEnumerable
IQueryable executed all the filters on the server-side and fetched the records that are matching all conditions and filters
the filter is not applied on the server side but first, it fetches all the records from the server and applies on the client side
IEnumerable is useful when we want to iterate the collection of objects which deals with in-process memory
IQueryable is useful when we want to iterate a collection of objects which deals with ad-hoc queries against the data source or remote database, like SQL Server
IQueryable is Subset of IEnumerable and inheritance IEnumerable
IQueryable executed all the filters on the server-side and fetched the records that are matching all conditions and filters
the filter is not applied on the server side but first, it fetches all the records from the server and applies on the client side
IEnumerable is useful when we want to iterate the collection of objects which deals with in-process memory
IQueryable is useful when we want to iterate a collection of objects which deals with ad-hoc queries against the data source or remote database, like SQL Server
No comments :
Post a Comment