data-efcore-patterns

Community

EF Core patterns for fast, safe data access.

Authorakoken
Version1.0.0
Installs0

System Documentation

What problem does it solve?

EF Core can be complex to configure for performance and migrations. This skill presents practical patterns to ensure efficient data access, reliable migrations, and safer update semantics in real-world apps.

Core Features & Use Cases

  • NoTracking by default to boost read performance, with explicit tracking when needed.
  • Never edit migrations manually to maintain a clean history and reliable deployments.
  • Dedicated Migration Service pattern (Aspire) to run migrations before app startup and isolate seeding in tests.
  • Use execution strategies to gracefully retry transient failures and preserve data integrity.
  • Safe bulk operations with ExecuteUpdate/ExecuteDelete to run single SQL statements instead of loading entities.
  • Proper DbContext lifetime management in DI for ASP.NET Core, background tasks, and long-lived components.

Quick Start

Configure your DbContext to disable tracking by default, wire up the CLI migration tooling, and implement a dedicated migration runner for automated migrations.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: data-efcore-patterns
Download link: https://github.com/akoken/dotfiles/archive/main.zip#data-efcore-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.