EFCore - Expression trees climbing
summary
60% live coding demos show how to build and inspect .NET expression trees with the raw Expression API, then use EF Core to translate them to SQL and expose pitfalls: string.Contains becomes LIKE and mixes with SQL three‑valued logic causing wrong results for NULLs. A dynamic OR over a list is assembled manually and then replaced with PredicateBuilder. A performance bug (compiling thousands of lambdas → ~3s) is fixed by a compiled static expression plus an ExpressionVisitor that replaces a parameter with a constant; also warns against storing expressions as record properties (ToString recursion).
AI-written summary · about
chapters (5)
- 0:00Introduction to Expression Trees
- 8:59Manual Expression Tree Creation
- 17:12Collections and Any/All Operations
- 27:52Universal Conditions with Expression Trees
- 42:57Summary and Q&A
related talks
43mBeyond LINQ: Using Expression Trees in .NET
51mUsing C# Expression Trees in the Real World
48mExpression trees in C#
59mEF Core 6: Fulfilling the Bucket List
48mEF Core 6: Fulfilling the Bucket List
43mEF Core 9: Evolving Data Access in .NET
56mFunctional Programming on .NET - The Best of Both Worlds
08mInterview with Mads Torgersen & Kresten Krab
