drn-entityframework

Automate EF Core context configuration, migrations, and entity tracking via DrnContext.

20|3|Updated Aug 13, 2023
One-click install
npx skills add https://github.com/duranserkan/DRN-Project --skill drn-entityframework
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drn-entityframework
Source: https://github.com/duranserkan/DRN-Project/tree/main/.agent/skills/drn-entityframework
Command: npx skills add https://github.com/duranserkan/DRN-Project --skill drn-entityframework

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DRN.Framework.EntityFramework provides a convention-based EF Core integration that automates context configuration, migration handling, and entity tracking for rapid data access and consistency across DRN projects.

Core Features & Use Cases

  • Auto-registration of DrnContext via attributes and conventions
  • Automatic configuration discovery for EF Core model and migrations
  • Entity tracking with Created/Modified/Deleted states and domain events
  • Design-time support for migrations and multi-context projects
  • JSON model mapping and type configuration enhancements

Quick Start

Initialize a QAContext by extending DrnContext<QAContext> and run migrations to bootstrap the database.

Frequently Asked Questions about drn-entityframework

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

FAQPage Schema
How do I automate EF Core context configuration and migrations with PostgreSQL?

Convention-based EF Core integration automates context configuration, migration handling, and entity tracking for PostgreSQL via Npgsql. It uses DrnContext to apply automatic configuration discovery and run code-first migrations without manual setup.

Can I use domain events with EF Core entity tracking for state changes?

Yes, EF Core entity tracking supports Created, Modified, and Deleted states while managing domain events. DrnContext automatically tracks these state changes and dispatches associated domain events during data operations.

Does DrnContext support design-time factory for multi-context EF Core projects?

DrnContext provides design-time support for migrations and multi-context projects. It includes design-time factory support to enable EF Core tooling and migration generation across multiple context instances.

How do I bootstrap a database using code-first migrations with EF Core conventions?

Extend DrnContext with your specific context type, then run migrations to bootstrap the database. Automatic configuration discovery handles EF Core model mapping and type configuration enhancements during startup.

What's the best way to handle automatic service registration for EF Core domain-driven design?

Auto-registration via attributes and conventions handles EF Core service registration for domain-driven design projects. Runtime startup validation ensures all dependencies are correctly configured before the application runs.

Does EF Core JSON model mapping work with convention-based configuration?

EF Core extensions provide JSON model mapping and type configuration enhancements within convention-based setups. DrnContext automatically discovers and applies JSON mapping configurations during model configuration.