A diary of building Expression Power Tools, a library that helps work with expressions and queries. Includes the ability to deserialize and reserialize a query so you can write a LINQ query in a Blazor WebAssembly client and execute it remotely on an ASP.NET Core server using Entity Framework Core.
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.
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.
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.