Common mistakes in EF Core
summary
Shows concrete fixes that turn slow EF Core into fast EF Core using .NET 7 and a 7 million-row sales table and load tests with benchmark.us and bombardier. Demonstrates IEnumerable vs IQueryable causing 7M rows fetched (≈2 GB memory, 64× slower, 3.5s vs 130ms), AsNoTracking cutting memory ~50% and speeding queries, cancellation tokens cancel SQL on user abort, ExecuteUpdate for server-side bulk updates (multiple× faster). Also covers DbContext pooling and TagWith for tracing problematic queries.
AI-written summary · about
chapters (11)
- 0:00EF Core common mistakes
- 2:17Seven deadly sins in EF Core
- 9:47IAsyncEnumerable performance trap
- 16:38AsNoTracking for read-only
- 19:52Explicit includes hidden costs
- 22:42Pagination pitfalls and fixes
- 26:40Cancellation tokens to prevent waste
- 32:36ExecuteUpdate in EF Core 7/8
- 36:37Advanced EF Core tips
- 47:31Performance: when it matters
- 55:32Q&A
related talks
01h 04mCommon mistakes in EF Core
01h 05mCommon mistakes in EF Core
01h 00mGetting the best out of Entity Framework Core
47mEF Core 6: Working on the Bucket List
59mEF Core 6: Fulfilling the Bucket List
01h 01mEntity Framework Core Unchained Getting the Best Performance from Your ORM
56mEntity Framework debugging using SQL Server: A Detective Story
01h 01m10 things you didn't know EF Core can do
