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.
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.
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.