ef-core-basics

Configure EF Core DbContext, entity mappings, and connection resiliency in .NET applications.

4|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill ef-core-basics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ef-core-basics
Source: https://github.com/FaysilAlshareef/dotnet-ai-kit/tree/main/skills/data/ef-core-basics
Command: npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill ef-core-basics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers configure Entity Framework Core DbContext, entity mappings, and connection resiliency so data access remains consistent, maintainable, and resilient across environments.

Core Features & Use Cases

  • Apply IEntityTypeConfiguration implementations from assembly to keep DbContext clean and maintainable.
  • Convert strongly-typed IDs and value objects with value converters and owned types to preserve domain integrity.
  • Enable retry-on-failure and command timeout settings for connection resiliency and production stability.
  • Register SaveChanges interceptors for auditing and domain event dispatch, and provide a design-time factory for running migrations.
  • Use cases include adding EF Core to an existing project, standardizing entity configuration, and preparing reliable migrations for CI/CD pipelines.

Quick Start

Configure your project's DbContext to apply configurations from the assembly, add value converters for strongly-typed IDs, enable retry-on-failure, and register interceptors for auditing and domain events.

Frequently Asked Questions about ef-core-basics

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

FAQPage Schema
How do I configure EF Core DbContext to apply IEntityTypeConfiguration implementations from the assembly?

To configure EF Core DbContext cleanly, you apply IEntityTypeConfiguration implementations from the assembly, keeping the DbContext maintainable while standardizing entity mappings across the domain model.

How do I set up value converters for strongly-typed IDs in EF Core?

Setting up value converters for strongly-typed IDs in EF Core involves configuring value conversions and owned types, which preserves domain integrity by mapping custom types directly to database columns.

What's the best way to enable retry-on-failure for EF Core connection resiliency?

The best way to enable connection resiliency in EF Core is to configure retry-on-failure and set command timeouts, ensuring production stability during transient database connection issues.

How do I register SaveChanges interceptors in EF Core for auditing and domain events?

Registering SaveChanges interceptors in EF Core allows you to automatically handle auditing and domain event dispatch during the save process, centralizing cross-cutting data access concerns.

Do I need a design-time factory to run EF Core migrations in CI/CD pipelines?

Yes, providing a design-time factory is required to run EF Core migrations reliably in CI/CD pipelines, enabling design-time DbContext instantiation without relying on application startup configuration.

Can I use global query filters with EF Core entity configurations to enforce domain rules?

Yes, you can use global query filters within EF Core entity configurations to automatically enforce domain rules like soft deletes across all queries targeting specific entities.