LINQ
Language Integrated Query: a set of C# operators such as Where, Select and OrderBy for filtering, shaping and combining sequences of data.
In more detail
The same operators work over in-memory collections (IEnumerable<T>) and over databases (IQueryable<T>), where EF Core translates them into SQL. LINQ queries are deferred: nothing runs until something enumerates the result.
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.
- 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.
- deferred execution — Building a query now but running it only when something asks for its results.
- lambda expression — A short anonymous function written inline and passed to other code, such as a condition for a filter.
- terminal operator — A LINQ call such as ToList, First, Count or Sum that actually runs a deferred query and produces a result.
Taught in
- Collections, Generics, and LINQ — Modern .NET Core, C# & Enterprise Microservices
- Querying, Change Tracking, and Saving Data — Modern .NET Core, C# & Enterprise Microservices