All | Series | TagsYears


LINQ and Expressions (Series: 3 Parts Total)

Dynamically Build LINQ Expressions

If you want to master Language Integrated Query (LINQ), you first need to understand the expressions it is based on. This blog post demonstrates how to dynamically build a LINQ expression tree with multiple nested conditions, use the compiled query to filter an in-memory list, then reuse the expression query a relational database.

LINQ ] [ EF Core ] [ Data ] [ .NET Core ]

Look Behind the IQueryable Curtain

Learn how to parse the expressions behind queries using the built-in ExpressionVisitor class. After successfully parsing an expression tree, discover how to modify the tree and apply your own rules by implementing your own queryable host.

LINQ ] [ EF Core ] [ Data ] [ .NET Core ]

Inspect and Mutate IQueryable Expression Trees

Learn how to build a custom query provider that intercepts the execution of IQueryable queries to snapshot and/or transform the expression. See examples of how to enforce an item limit and evaluate which parts of the filter succeeded or failed to provider the final enumerated result.

LINQ ] [ EF Core ] [ Data ] [ .NET Core ]