wshaddix avatar

Dotnet Domain Modeling

If you're building line-of-business apps in C# and want to move beyond anemic CRUD models, this covers the tactical DDD patterns that actually matter: aggregate roots that enforce invariants, value objects using records, domain events, and repository contracts. The aggregate design rules table is worth the price of admission alone (reference other aggregates by ID only, one aggregate per transaction). It stays focused on the pure domain layer and explicitly punts on EF Core mapping, validation, and messaging infrastructure. The Money and Order examples show how to use private setters, factory methods, and collection encapsulation to keep business rules inside the model rather than scattered across services. Good fit if you're tired of services that are just database update scripts with extra steps.

skills.sh installs
538
GitHub stars
90
last updated
Aug 21, 2026

Install

$ npx -y skills add wshaddix/dotnet-skills --skill dotnet-domain-modeling --agent claude-code

Installs into .claude/skills of the current project.

Files

dotnet-domain-modeling

Domain-Driven Design tactical patterns in C#. Covers aggregate roots, entities, value objects, domain events, integration events, domain services, repository contract design, and the distinction between rich and anemic domain models. These patterns apply to the domain layer itself -- the pure C# model that encapsulates business rules -- independent of any persistence technology.

Out of scope: EF Core configuration and aggregate persistence mapping -- see [skill:dotnet-efcore-architecture]. Tactical EF Core usage (DbContext lifecycle, migrations, interceptors) -- see [skill:dotnet-efcore-patterns]. Input validation at API boundaries -- see [skill:dotnet-validation-patterns]. Choosing between EF Core, Dapper, and ADO.NET -- see [skill:dotnet-data-access-strategy]. Vertical slice architecture and request pipeline patterns -- see [skill:dotnet-architecture-patterns]. Messaging infrastructure and saga orchestration -- see [skill:dotnet-messaging-patterns].

Sponsors

Details

Repository
github.com/wshaddix/dotnet-skills
Category
.NET & C#
First seen
Jun 3, 2026

More from wshaddix/dotnet-skills

All 13

Recommended

More .NET & C#
1aaronontheweb avataraspire-integration-testingaaronontheweb/dotnet-skillsWrite integration tests using .NET Aspire's testing facilities with xUnit. Covers test fixtures, distributed application setup, endpoint discovery, and patterns522skills.sh installs
2wshaddix avatarpackage-managementwshaddix/dotnet-skillsNuGet package management best practices including versioning strategies, central package management, and dependency resolution. Use when setting up Central Pack518skills.sh installs
3umbraco avatarumbraco-backofficeumbraco/umbraco-cms-backoffice-skillsUmbraco backoffice extension customisation - complete working examples showing how extension types combine447skills.sh installs
4umbraco avatarumbraco-openapi-clientumbraco/umbraco-cms-backoffice-skillsSet up OpenAPI client for authenticated API calls in Umbraco backoffice (REQUIRED for custom APIs)405skills.sh installs
5umbraco avatarumbraco-property-editor-uiumbraco/umbraco-cms-backoffice-skillsImplement property editor UIs in Umbraco backoffice using official docs405skills.sh installs
6syncfusion avatarsyncfusion-blazor-licensesyncfusion/blazor-ui-components-skillsGenerate, register, secure, validate, and troubleshoot Syncfusion Blazor license keys across all Blazor project types403skills.sh installs