cck-ef-core

Configure EF Core DbContext and migrations for SQL Server data access.

2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/s205109/AHKFlowApp --skill cck-ef-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cck-ef-core
Source: https://github.com/s205109/AHKFlowApp/tree/main/.claude/skills/cck-ef-core
Command: npx skills add https://github.com/s205109/AHKFlowApp --skill cck-ef-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns and practices for using EF Core (.NET 10) with SQL Server to implement data access in AHKFlowApp, including DbContext registration, configurations, migrations, and optimization strategies.

Core Features & Use Cases

  • DbContext-based data access without repositories
  • SQL Server with retry and migrations-based workflow
  • Projections, compiled queries, interceptors, and value converters
  • Use cases: onboarding new entities, optimizing performance, and safe migrations

Quick Start

Set up EF Core with AppDbContext for SQL Server, enable retry on failure, apply migrations, and inject DbContext directly into MediatR handlers.

Frequently Asked Questions about cck-ef-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure EF Core DbContext directly in MediatR handlers without a repository pattern?

To use EF Core DbContext directly in handlers, register AppDbContext with dependency injection and inject it into MediatR handlers. This approach removes the repository abstraction layer, enabling direct data access while maintaining testability.

What's the best way to enable retry on failure for SQL Server in EF Core?

The best way to enable retry on failure for SQL Server in EF Core is to call EnableRetryOnFailure when configuring the DbContext options. This ensures transient error resilience during database connections and command execution.

How do I optimize EF Core query performance using projections and compiled queries?

Optimize EF Core query performance by using projections to select only required columns and compiling queries to cache translation. This reduces data transfer and eliminates repeated SQL generation overhead for frequent operations.

Does EF Core code-first migrations workflow support interceptor-based auditing?

Yes, EF Core code-first migrations fully support interceptor-based auditing. You configure interceptors during DbContext setup to automatically track entity changes, enabling audit logging alongside safe schema migrations.

Why use value converters in EF Core and when do I need them for SQL Server?

Use EF Core value converters to map complex property types to SQL Server-compatible formats. You need them when your entity properties require custom serialization logic that does not directly match database column types.