ef-core-configuration

Generate EF Core Fluent API configurations mapping domain entities to database tables.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/gerardogarnica/aurora-flowboard-api --skill ef-core-configuration-gerardogarnica
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ef-core-configuration
Source: https://github.com/gerardogarnica/aurora-flowboard-api/tree/main/.claude/skills/ef-core-configuration
Command: npx skills add https://github.com/gerardogarnica/aurora-flowboard-api --skill ef-core-configuration-gerardogarnica

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates and enforces explicit EF Core configuration classes to map domain entities to database tables with clear relationships, constraints, and conventions, preserving domain purity in a Clean Architecture setup.

Core Features & Use Cases

  • Explicit mappings for each entity using Fluent API, including ToTable, HasKey, Property, HasIndex, HasOne/HasMany, and OwnsOne.
  • Keeps domain logic persistence-ignorant by placing configurations in the Infrastructure layer.
  • Provides deterministic, version-safe configuration patterns that ease evolution and maintenance.

Quick Start

Create an IEntityTypeConfiguration<T> implementation for your entity and place it under src/{name}.Infrastructure/Configurations/ to apply Fluent API mappings.

Frequently Asked Questions about ef-core-configuration

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

FAQPage Schema
How do I configure EF Core entities using Fluent API in a Clean Architecture project?

EF Core configurations using Fluent API map domain entities to database tables by creating IEntityTypeConfiguration implementations in the Infrastructure layer, keeping domain logic persistence-ignorant. This enforces explicit mappings for keys, relationships, and indexes.

Why use IEntityTypeConfiguration instead of data annotations for EF Core mappings?

IEntityTypeConfiguration keeps domain entities persistence-ignorant by placing Fluent API mappings in the Infrastructure layer, preserving domain purity while enforcing deterministic, version-safe configuration patterns for ToTable, HasKey, and relationship constraints.

Can I configure OwnsOne and HasMany relationships explicitly with EF Core Fluent API?

Yes, explicit EF Core configurations support OwnsOne, HasOne, and HasMany relationship mappings using Fluent API. This ensures clear constraints and conventions are applied directly within the Infrastructure layer.

What is the best way to keep domain entities persistence-ignorant while using EF Core?

The best way is applying explicit EF Core configurations via IEntityTypeConfiguration classes in the Infrastructure layer, using Fluent API for ToTable, HasKey, Property, and HasIndex mappings to preserve domain purity.

Does this EF Core configuration approach support indexing and constraints?

Yes, explicit EF Core configurations enforce proper indexing with constraints using Fluent API. HasIndex and Property configurations are applied to ensure deterministic, version-safe database schema patterns.

How do I structure EF Core configuration files for Clean Architecture?

Create IEntityTypeConfiguration implementations for each entity and place them under src/{name}.Infrastructure/Configurations/ to apply Fluent API mappings, ensuring domain logic remains separate from database persistence details.