dotnet-domain-driven-design

Apply Domain-Driven Design patterns to .NET projects with aggregates and repositories.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/Muhomorik/KanelBulleKapital --skill dotnet-domain-driven-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-domain-driven-design
Source: https://github.com/Muhomorik/KanelBulleKapital/tree/main/.claude/skills/dotnet-domain-driven-design
Command: npx skills add https://github.com/Muhomorik/KanelBulleKapital --skill dotnet-domain-driven-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Domain complexity in .NET projects often leads to tangled code, unclear boundaries, and brittle maintenance. This skill provides a pragmatic blueprint for applying Domain-Driven Design to .NET applications, helping teams model the domain clearly and keep architectural boundaries intact.

Core Features & Use Cases

  • Domain modeling with aggregates, entities, and value objects that enforce invariants.
  • Repositories, domain services, and domain events to support clean architecture and event-driven flows.
  • Layered architecture guidance (Domain/Application/Infrastructure) with asynchronous data access and tell-don't-ask discipline.
  • Use Case: Build a robust order management system where domain rules are enforced inside aggregates and persistence is abstracted behind repositories.

Quick Start

Create a new .NET project and apply the DDD structure by defining aggregates, value objects, and repository interfaces.

Frequently Asked Questions about dotnet-domain-driven-design

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

FAQPage Schema
How do I structure a .NET project using Domain-Driven Design patterns?

To structure a .NET project using Domain-Driven Design, you organize code into Domain, Application, and Infrastructure layers, defining aggregates, value objects, and repository interfaces to enforce clean architectural boundaries and separate concerns.

What is the best way to enforce business invariants in C# domain modeling?

The best way to enforce business invariants in C# domain modeling is by encapsulating rules within aggregates and entities using a tell-don't-ask discipline, ensuring domain boundaries remain robust and validation logic stays centralized.

Can I apply DDD architecture to Blazor and WPF applications, or is it only for ASP.NET Core?

You can apply DDD architecture across Blazor, WPF, and ASP.NET Core applications. The pattern focuses on domain modeling and clean architecture, explicitly avoiding UI or web-framework specifics to maintain separation of concerns.

How do repositories and domain events support clean architecture in .NET?

Repositories and domain events support clean architecture in .NET by abstracting asynchronous data access behind interfaces and signaling intents across layers, which keeps infrastructure concerns decoupled from the core domain.

When should I not use aggregate roots for domain modeling in C#?

You should avoid using aggregate roots for domain modeling in C# when the domain logic is trivial or lacks complex invariants, as the overhead of layered architecture and repository abstractions outweighs the structural benefits for simple CRUD operations.