dotnet-domain-modeling

Models .NET business domains using Domain-Driven Design tactical patterns.

Updated Aug 16, 2025
One-click install
npx skills add https://github.com/dodyg/blue-nile-pds --skill dotnet-domain-modeling-dodyg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-domain-modeling
Source: https://github.com/dodyg/blue-nile-pds/tree/main/.agents/skills/dotnet-domain-modeling
Command: npx skills add https://github.com/dodyg/blue-nile-pds --skill dotnet-domain-modeling-dodyg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill tackles the difficulty of building maintainable domain models in C# that encapsulate business rules without relying on anemic data structures or persistence details.

Core Features & Use Cases

  • Aggregates and Entities: Design aggregate roots with identity, equality, and event raising for enforcing invariants.
  • Value Objects and Domain Events: Create immutable value types and event contracts for loose coupling and side effects.
  • Use Case: In an e-commerce system, use this Skill to model an Order aggregate that handles line additions, submissions, and total calculations while raising events for notifications.

Quick Start

Use the dotnet-domain-modeling skill to create a value object for Money with addition and currency validation in my .NET application.

Frequently Asked Questions about dotnet-domain-modeling

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

FAQPage Schema
How do I model a rich C# domain model without creating an anemic data structure?

To build a rich C# domain model, encapsulate business rules within aggregates and entities using Domain-Driven Design. This prevents anemic data structures by enforcing invariants and raising domain events directly within the domain layer.

How do I implement a value object for Money with currency validation in .NET?

Implement a Money value object in .NET by creating an immutable type that handles addition and enforces currency validation. This encapsulates domain logic and ensures loose coupling through side-effect-free operations.

When do I need to use aggregate roots and domain events in C#?

Use aggregate roots and domain events in C# when modeling complex business rules that require strict invariant enforcement and event-driven architecture. Aggregates handle state changes, while domain events notify other system parts of those changes.

Does DDD domain modeling require persistence details in the C# domain layer?

DDD domain modeling explicitly keeps persistence details out of the C# domain layer. It creates persistence-agnostic models by relying on repositories for data access, ensuring the domain focuses entirely on business rules.

What is the best way to design an Order aggregate that handles line additions and submissions?

The best way to design an Order aggregate is to use tactical DDD patterns in C#. Model the aggregate root to handle line additions, submissions, and total calculations internally, raising domain events for notifications upon state changes.