ORM convenience hides expensive queries until production traffic arrives. EF Core 9 gives better tools — but you still need discipline about shapes, tracking, and database design.
Query Shapes That Scale
Project early with Select DTOs, avoid cartesian explosions from eager Include graphs, and paginate with keyset pagination on large tables — OFFSET scans do not scale forever.
Tracking vs No-Tracking
Read-heavy APIs should default to AsNoTracking(). Explicit transactions for writes; isolation levels chosen per use case, not defaulted blindly.
Compiled Models and Migrations
Compiled models cut startup time for large contexts. Migrations reviewed like application code — index additions planned for off-peak windows, backfills batched.
Observability
Log slow queries, capture execution plans for regressions, and load-test with realistic multi-tenant data volumes. Local dev with 100 rows lies; staging must not.