drn-domain-design

Standardize domain modeling with DRN.Domain patterns and EF Core configurations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DRN.Domain Design standardizes domain modeling and data access in DRN.Framework by providing a set of opinionated patterns including SourceKnown IDs, repository contracts, domain events, and EF Core configuration to ensure consistent architecture across projects.

Core Features & Use Cases

  • Type-safe identity system with SourceKnownId and SourceKnownEntityId
  • Entity bases and AggregateRoot patterns
  • Repository contracts and data persistence conventions
  • EF Core configuration with attribute-first and Fluent API support
  • Domain events, auditing, and JSON-based model composition
  • Pagination and advanced query patterns
  • Public API integration standards and DTO mapping

Quick Start

Create a new domain entity by inheriting from SourceKnownEntity and annotating it with an EntityType attribute to align with DRN.Domain design standards.

Frequently Asked Questions about drn-domain-design

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

FAQPage Schema
How do I implement type-safe entity identities in domain-driven design?

Type-safe entity identities in domain-driven design are implemented using SourceKnownId and SourceKnownEntityId patterns, which enforce strongly-typed identity generation and prevent common ID mapping errors across aggregate roots. You apply them by inheriting from SourceKnownEntity and annotating with an EntityType attribute.

Can I use Fluent API for EF Core configuration alongside domain events?

Yes, EF Core configuration supports both attribute-first and Fluent API approaches while simultaneously managing domain events, auditing, and JSON-based model composition to ensure persistence conventions remain consistent across DRN projects.

What's the best way to standardize repository contracts and pagination in a DDD project?

Repository contracts and pagination standards are standardized by implementing opinionated DRN.Domain data access patterns, defining explicit repository interfaces and applying advanced query patterns to enforce consistent persistence conventions.

Does the DRN domain design pattern support DTO mapping and public API integration?

Yes, DTO mapping and public API integration standards are core requirements of the DRN domain design pattern, ensuring aggregate roots and domain entities can be cleanly serialized and exposed through external APIs.

Why do I need SourceKnown IDs for aggregate roots instead of generic GUIDs?

SourceKnown IDs enforce type-safe identities for aggregate roots by typing each identifier to its specific entity, preventing cross-entity ID assignment errors that generic GUIDs or integers allow during domain modeling and EF Core data access.