dotnet-cqrs/docs/tutorials/modular-solution/README.md

1.2 KiB

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