EF Core 9 brings bulk updates without loading entities (ExecuteUpdateAsync/ExecuteDeleteAsync), compiled models for startup performance, AsSplitQuery to eliminate cartesian explosion on multi-Include queries, and IDbContextFactory<T> for concurrent access. Projection over Include is the single highest-impact query optimisation — select only the columns you need instead of hydrating full entity graphs.
Three high-impact EF Core query optimisations.
Include loads entire entity graphs. Select to a DTO returns only needed columns, avoids N+1, and doesn't require change tracking.
Avoid Load → foreach → modify → SaveChanges for bulk changes. ExecuteUpdateAsync generates a single UPDATE SQL with no entity loading.
Two Include calls on a 10k-row table can generate 100M row combinations. AsSplitQuery sends two SQL SELECT statements instead.
Sign in to share your feedback and join the discussion.