---
title: 'Domain-Driven Design'
excerpt: 'Refactor an anemic rental model into a rich domain — then add value objects and Result errors — with .NET Minimal API.'
tags: ['ddd', 'domain-driven-design', 'dotnet']
icon: 'Layers3'
badge: 'New'
---

## What you will learn

Model an **equipment rental** domain in .NET. Start from an anemic (CRUD/service-heavy) design, push rules into entities, then introduce value objects and `Result` for domain errors.

## Course outline

Numbered folders under `content/learn/ddd/` drive the live nav (Foundations → Elements → Aggregates → Repositories/CQRS → Domain & Integration Events → Testing → Consistency Boundaries).

| Chapter | Focus |
| --- | --- |
| [Foundations](/learn/ddd/foundations) | Modelling, anemic vs rich |
| [Elements of a domain model](/learn/ddd/elements-of-a-domain-model) | Entities, value objects, domain services |
| [Aggregates and associations](/learn/ddd/aggregates-and-associations) | Consistency boundaries inside a model |
| [Repositories, specification, CQRS](/learn/ddd/repositories-specification-and-cqrs) | Persistence and read models |
| [Domain and integration events](/learn/ddd/domain-and-integration-events) | Deferred dispatch, outbox, inbox |
| [Testing domain models](/learn/ddd/testing-domain-models) | Unit / integration tests |
| [Consistency boundaries](/learn/ddd/consistency-boundaries) | CAP, one aggregate / txn, sagas, AP across BCs |

Domain language we use throughout: **Customer**, **Equipment**, `Reserve` / `Release`, **Rental**, fee, availability, rental period.

<Callout variant="note" title="In-memory only">
  Static dictionaries seed demo data. Prefer repositories + a database in production.
</Callout>
