entity-framework-core

Featured

Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications. USE FOR: DbContext, migrations, model configuration, EF queries, tracking, loading, performance, transactions, and EF6 migration decisions. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

Data & Documents 463 stars 35 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Entity Framework Core ## Trigger On - working on `DbContext`, migrations, model configuration, or EF queries - reviewing tracking, loading, performance, or transaction behavior - porting data access from EF6 or custom repositories to EF Core - optimizing slow database queries ## Documentation - [EF Core Overview](https://learn.microsoft.com/en-us/ef/core/) - [Performance](https://learn.microsoft.com/en-us/ef/core/performance/) - [Efficient Querying](https://learn.microsoft.com/en-us/ef/core/performance/efficient-querying) - [Migrations](https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/) - [What's New in EF Core 9](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-9.0/whatsnew) ### References - [patterns.md](references/patterns.md) - Query patterns, tracking strategies, loading strategies, projections, compiled queries, pagination, and temporal tables - [anti-patterns.md](references/anti-patterns.md) - Common EF Core mistakes including N+1 queries, large contexts, generic repositories, and missing indexes ## Workflow 1. **Prefer EF Core for new development** unless a documented gap requires Dapper or raw SQL 2. **Keep `DbContext` lifetime scoped** — align with unit of work 3. **Review query translation** — check generated SQL, avoid N+1 4. **Treat migrations as first-class** — reviewable, not throwaway 5. **Be deliberate about provider behavior** — cross-provider but not identical 6. **Validate with query inspection** — not just in-me...

Details

Author
managedcode
Repository
managedcode/dotnet-skills
Created
4 months ago
Last Updated
2 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category