What problem does it solve?
EF Core usage often suffers from incorrect DbContext lifetimes, unoptimized queries, and migration management challenges. This Skill consolidates best practices into clear guidance, patterns, and templates to improve reliability and performance.
Core Features & Use Cases
- DbContextFactory usage guidance to ensure proper lifetimes in dependency injection.
- Query optimization techniques including AsNoTracking, Include/ThenInclude, projection, and paging.
- Migration management and reverse engineering workflows to evolve databases safely and predictably.
- Template-driven codegen and scaffolding to accelerate EF Core projects.
Quick Start
Configure your DI container to use a DbContextFactory, enable AsNoTracking for read-only queries, apply Include/ThenInclude for related data, and use dotnet ef commands to add and apply migrations, then scaffold reverse-engineered DbContext/models as needed.