Domain-Driven Design

Introduction

Domain

Domain (Entities, contexts, aggregates)

Application

Orchestration des opérations métier

Interface

Infrastructure

Example

.cs


MyApp/
 ├─ Domain/
 │   ├─ Entities/
 │   │   ├─ Customer.cs
 │   │   └─ Order.cs
 │   └─ ValueObjects/
 │       └─ Address.cs
 ├─ Application/
 │   ├─ Dtos/
 │   │   ├─ CustomerDto.cs
 │   │   └─ AddressDto.cs
 │   └─ Services/
 │       └─ CustomerService.cs
 ├─ Infrastructure/
 │   ├─ Persistence/
 │   │   ├─ AppDbContext.cs
 │   │   └─ CustomerRepository.cs
 │   └─ Migrations/ (créé par EF)
 └─ Program.cs