dotnet-cqrs/docs/tutorials/modular-solution
2025-12-11 01:18:24 -05:00
..
01-solution-structure.md this is a mess 2025-12-11 01:18:24 -05:00
02-domain-layer.md this is a mess 2025-12-11 01:18:24 -05:00
03-cqrs-layer.md this is a mess 2025-12-11 01:18:24 -05:00
04-dal-layer.md this is a mess 2025-12-11 01:18:24 -05:00
05-api-layer.md this is a mess 2025-12-11 01:18:24 -05:00
06-testing-strategy.md this is a mess 2025-12-11 01:18:24 -05:00
README.md this is a mess 2025-12-11 01:18:24 -05:00

Modular Solution Tutorial

Build a properly structured .NET solution with separated concerns.

Overview

This tutorial walks through creating a modular solution with proper layer separation:

  • Api Layer - HTTP/gRPC endpoints
  • CQRS Layer - Commands, queries, handlers
  • Domain Layer - Entities, value objects, domain events
  • Infrastructure Layer - Data access, external services

Prerequisites

  • .NET 10 SDK
  • Basic C# knowledge
  • Understanding of CQRS pattern

Tutorial Steps

  1. Solution Structure - Create project structure
  2. Domain Layer - Define entities and events
  3. CQRS Layer - Implement commands and queries
  4. DAL Layer - Set up Entity Framework Core
  5. API Layer - Configure HTTP/gRPC endpoints
  6. Testing Strategy - Unit and integration tests

Final Structure

OrderManagement.sln
├── OrderManagement.Api/
├── OrderManagement.CQRS/
├── OrderManagement.Domain/
├── OrderManagement.Infrastructure/
└── OrderManagement.Tests/

See Also