dotnet-ddd-quickref

Reference DDD patterns and anti-patterns for .NET 9 implementations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AndresJQCode/template-net-core-9-DDD --skill dotnet-ddd-quickref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-ddd-quickref
Source: https://github.com/AndresJQCode/template-net-core-9-DDD/tree/main/.claude/skills/dotnet-ddd-quickref
Command: npx skills add https://github.com/AndresJQCode/template-net-core-9-DDD --skill dotnet-ddd-quickref

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides developers with a quick reference for common Domain-Driven Design (DDD) patterns and anti-patterns in .NET, helping to enforce best practices and avoid common pitfalls.

Core Features & Use Cases

  • Pattern Examples: Demonstrates correct implementations for Entities, Value Objects, Commands, Queries, and API Endpoints.
  • Violation Identification: Highlights common code smells and architectural mistakes to avoid.
  • Use Case: A developer is unsure how to correctly implement a Domain Entity with behavior and events. They consult this Skill to see a clear, correct example and understand the underlying principles.

Quick Start

Show me the correct pattern for a Domain Entity.

Frequently Asked Questions about dotnet-ddd-quickref

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

FAQPage Schema
How do I implement a Domain Entity with behavior and events in .NET?

To implement a Domain Entity in .NET, encapsulate state and behavior within the entity class, raising domain events for state changes to enforce invariants and maintain clean architecture boundaries.

What is the correct pattern for a Value Object in clean architecture?

A Value Object in clean architecture is an immutable object identified by its properties rather than a unique ID, enforcing domain invariants without side effects or persistent identity.

How do I decide between using Commands and Queries with CQRS in .NET?

To decide between Commands and Queries in CQRS, separate write operations that change state from read operations that fetch data, optimizing each path independently within your .NET architecture.

What are common DDD anti-patterns and code smells to avoid in .NET?

Common DDD anti-patterns include anemic domain models with logic in services, leaking persistence concerns into entities, and bypassing aggregate roots, which violate clean architecture principles.

Does this DDD reference cover API endpoint patterns for .NET 9?

Yes, this DDD reference includes API endpoint code templates for .NET 9, demonstrating how to correctly wire commands and queries to HTTP endpoints while maintaining clean architectural separation.

When should I not use CQRS in a domain-driven design project?

You should not use CQRS when domain logic is simple and CRUD operations suffice, as splitting commands and queries adds unnecessary complexity and overhead to straightforward .NET applications.