IQueryable<T>
The .NET interface for a query that a provider such as EF Core translates and runs elsewhere, typically as SQL in a database.
In more detail
It holds an expression tree describing your lambdas rather than compiled code. Keep filters and projections on the IQueryable<T> so the database does the work, then call a terminal method.
Related terms
- IEnumerable<T> — The .NET interface for any sequence you can loop over one item at a time, the basis of foreach and in-memory LINQ.
- expression tree — A data structure that describes code, such as a lambda, as a tree of operations that another program can inspect and translate.
- query provider — The component behind an IQueryable<T> that translates a LINQ expression tree into another query language and runs it.
- Entity Framework Core — Microsoft's object-relational mapper for .NET, which lets code query and save database data as C# objects and translates LINQ into SQL.
Taught in
- Collections, Generics, and LINQ — Modern .NET Core, C# & Enterprise Microservices
- Querying, Change Tracking, and Saving Data — Modern .NET Core, C# & Enterprise Microservices
- The Repository Pattern — Modern .NET Core, C# & Enterprise Microservices