Best practices for high-performance Entity Framework Core (EF Core 8/9): fast read queries AND fast writes/inserts, plus high-throughput, data-intensive apps (concurrency, parallel/background jobs, streaming large datasets, resiliency, optimistic concurrency, bulk insert). ALWAYS-ON for EF Core projects: if the codebase references any EF Core package (Microsoft.EntityFrameworkCore*, Npgsql.EntityFrameworkCore.PostgreSQL, Pomelo.EntityFrameworkCore.MySql, Oracle/MySql EF providers) or contains a DbContext, DbSet properties, OnModelCreating, or a Migrations folder, consult and apply this skill before writing, generating, reviewing, refactoring, or fixing ANY data-access code in that project — even when performance, N+1, slow SaveChanges, or bulk insert are not explicitly mentioned. All fixes must preserve original behavior (same output). Also use for "review my EF Core query", "why is this insert slow", and "scale my EF Core app".
2026-06-29