What problem does it solve?
This Skill helps you avoid common EF Core performance and correctness pitfalls—especially around tracking, migrations, and inefficient query loading—so your application stays reliable as it grows.
Core Features & Use Cases
- NoTracking by default: Improves read performance while ensuring writes work correctly via explicit updates or tracking.
- Safe migration management: Guides you to create, remove, apply, and generate SQL scripts using EF Core CLI rather than manual edits.
- Production-ready migration execution: Separates migrations from app startup using a dedicated migration service (including .NET Aspire orchestration).
- Transient failure resilience: Uses
CreateExecutionStrategy() for retryable operations that may fail temporarily.
- Efficient bulk writes: Recommends
ExecuteUpdateAsync / ExecuteDeleteAsync to avoid loading entities into memory.
- Query splitting for navigation collections: Prevents cartesian explosion when loading multiple related collections with
SplitQuery and targeted SingleQuery.
Quick Start
Apply EF Core best practices by configuring your DbContext for NoTracking-by-default, enabling query splitting, and running migrations through a dedicated migration service coordinated with Aspire.