Skill page Data v1.0.0

Entity Framework Core

Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications.

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

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-memory mental model

Deliver

  • EF Core models and queries that match the domain
  • safer migrations and lifetime management
  • performance-aware data access decisions
  • proper indexing and query optimization

Validate

  • query behavior is intentional (check SQL logs)
  • migrations are reviewable and correct
  • no N+1 queries in common paths
  • indexes exist for filtered/sorted columns
  • DbContext lifetime is scoped properly
  • concurrency is handled for critical entities

Related skills

v1.0.1

Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is not the right next step.

dotnet skills install entity-framework6
v1.0.0

Use ManagedCode.MarkItDown when a .NET application needs deterministic document-to-Markdown conversion for ingestion, indexing, summarization, or content-processing workflows.

dotnet skills install managedcode-markitdown
v1.0.0

Use ManagedCode.Storage when a .NET application needs a provider-agnostic storage abstraction with explicit configuration, container selection, upload and download flows, and…

dotnet skills install managedcode-storage

Related agents