dotnet-scaffold-ef-entity

Builds an EF Core entity class and registers it in the DbContext using Umbrella conventions.

8|1|Updated Feb 5, 2018
One-click install
npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-ef-entity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-scaffold-ef-entity
Source: https://github.com/umbrella-libraries/Umbrella/tree/main/.ai-shared/skills/dotnet-scaffold-ef-entity
Command: npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-ef-entity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold EF Core entity creation and DbContext configuration following Umbrella conventions to reduce boilerplate and ensure consistency.

Core Features & Use Cases

  • Scaffold a fully-formed entity class with Id, audit properties, string length annotations, and navigation properties.
  • Register the new entity in the DbContext using the Add<EntityName>(builder) pattern and the generated configuration.
  • Use in multi-project solutions with consistent naming, namespaces, and conventions across Core.Domain and Core.Data.

Quick Start

Create a new EF Core entity class and register it in the DbContext following Umbrella patterns.

Frequently Asked Questions about dotnet-scaffold-ef-entity

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

FAQPage Schema
How do I scaffold an EF Core entity and register it in the DbContext?

To scaffold an EF Core entity, you generate a class with Id, audit properties, and navigation properties, then register it in the DbContext using the Add<EntityName>(builder) pattern with generated configuration to ensure consistent naming and mapping.

What conventions does EF Core entity scaffolding apply for multi-project solutions?

EF Core entity scaffolding applies Umbrella conventions across Core.Domain and Core.Data projects, enforcing consistent naming, namespace ordering, audit interfaces, string length attributes, non-null keys, and proper foreign key relationships.

Can I use scaffolded EF Core entities with existing audit interfaces and string length attributes?

Yes, scaffolded EF Core entities respect existing audit interfaces and string length attributes while enforcing non-null keys and configuring proper foreign key relationships during DbContext registration.

What's the best way to reduce boilerplate when creating EF Core entities?

The best way to reduce EF Core entity boilerplate is using scaffolding that automatically generates fully-formed entity classes with Id, audit properties, navigation properties, and DbContext configuration following established conventions.

Why does my EF Core entity need DbContext configuration after scaffolding?

Your EF Core entity needs DbContext configuration after scaffolding to register the entity using the Add<EntityName>(builder) pattern, ensuring the generated mapping configuration applies consistent naming and foreign key relationships.

Does EF Core entity scaffolding work for multi-project solutions with separate domain and data projects?

Yes, EF Core entity scaffolding works for multi-project solutions by applying consistent naming, namespaces, and conventions across Core.Domain and Core.Data projects, ensuring entities and DbContext mappings remain aligned.