expression tree
A data structure that describes code, such as a lambda, as a tree of operations that another program can inspect and translate.
In more detail
Unlike compiled code, a tree can be examined and translated before anything runs. IQueryable<T> stores your lambdas as expression trees, which is how EF Core can turn p => p.Price < 20m into SQL.
Related terms
- 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.
- query provider — The component behind an IQueryable<T> that translates a LINQ expression tree into another query language and runs it.
- lambda expression — A short anonymous function written inline and passed to other code, such as a condition for a filter.
Taught in
- Collections, Generics, and LINQ — Modern .NET Core, C# & Enterprise Microservices