Skip to content

Clean Architecture in .NET

A 12-part guide to building a production-ready .NET API from an empty solution: every layer, a first feature, tests, authentication, caching, observability and deployment. Each part builds on the one before it and links to the full code at that point.

Follow new parts with RSS

  1. Part 1
    Setting Up a Clean Architecture Solution in .NET

    Set up a .NET Clean Architecture solution with enforced dependency rules, architecture tests, strict analyzers, CI and central package management.

  2. Part 2
    Setting Up the Domain Layer in Clean Architecture (Coming Soon)
  3. Part 3
    Setting Up the Application Layer in Clean Architecture (Coming Soon)
  4. Part 4
    Setting Up the Infrastructure Layer in Clean Architecture (Coming Soon)
  5. Part 5
    Setting Up the API Layer in Clean Architecture (Coming Soon)
  6. Part 6
    How to Add a Feature in Clean Architecture, Step by Step (Coming Soon)
  7. Part 7
    Integration Testing ASP.NET Core with Testcontainers and PostgreSQL (Coming Soon)
  8. Part 8
    Password Hashing and JWT Refresh Tokens in ASP.NET Core (Coming Soon)
  9. Part 9
    Optimistic Concurrency with EF Core and PostgreSQL xmin (Coming Soon)
  10. Part 10
    Dapper Search and HybridCache with Redis in .NET (Coming Soon)
  11. Part 11
    .NET Observability with OpenTelemetry and Grafana (Coming Soon)
  12. Part 12
    Deploying a .NET API to Linux with Azure DevOps (Coming Soon)