
Clean Architecture with .NET
Design scalable .NET applications by using Clean Architecture principles and proven patterns
Packt Publishing
Published on 30. April 2026
Book
Paperback/Softback
490 pages
978-1-80512-853-3 (ISBN)
Description
Learn Clean Architecture as a set of organizing principles, not just code templates. This book shows how to design scalable, testable .NET apps using modern patterns, DDD, CQRS, and secure Azure integration.
Free with your book: DRM-free PDF version + access to Packt's next-gen Reader*
Key Features
Architect robust .NET apps with domain-driven, testable Clean Architecture
Integrate Azure External ID and Key Vault with real-world cases
Apply MediatR, CQRS, and modern .NET practices to streamline architecture
Implement persistence with EF Core using a code-first approach and Clean Architecture boundaries
Purchase of the print or Kindle book includes a free PDF eBook
Book DescriptionLearn how to apply Clean Architecture in real-world .NET applications with Azure in this guide. Designed around an e-commerce project - Project Odyssey, you'll design and build every architectural layer, from core domain logic and application orchestration to infrastructure and presentation.
This book equips you to apply DDD, CQRS, MediatR, and dependency injection, enabling loosely coupled, testable systems. You'll build reusable and modular code structures that scale with your application's complexity and learn how to persist data using EF Core with a code-first approach, managing schema evolution with migrations while keeping infrastructure concerns isolated from your domain logic. Learn how to develop secure systems by integrating Azure External ID, Azure Key Vault, and application-level authentication and authorization.
Gain practical experience with Blazor Server, Razor components, and MudBlazor UI, all integrated within a layered architecture. Learn to enforce business logic boundaries, reduce boilerplate with generic request handlers, and use real-world use cases like payment processing and shopping cart management.
Whether you're new to Clean Architecture or scaling up enterprise solutions, this book provides the patterns, tools, and mindset to succeed.
*Email sign-up and proof of purchase required What you will learn
Design scalable .NET applications with Clean Architecture principles
Structure core logic using use cases, CQRS, and domain modeling
Integrate Azure External ID, Key Vault, and secure service configurations
Use EF Core with a code-first approach to manage database schemas and persistence
Apply MediatR and FluentValidation for streamlined workflows
Build rich UIs using Blazor Server and MudBlazor
Build scalable multi-host applications with structured, transparent service composition
Reduce architectural boilerplate while maintaining structure
Who this book is for.NET developers, software engineers, and solution architects who want to build applications that are easier to understand, test, and evolve over time. This book is a good fit if you're already familiar with C# and .NET, and want a clearer, more practical way to structure real-world applications using Clean Architecture. Basic knowledge of web development and Azure will help you follow along.
Free with your book: DRM-free PDF version + access to Packt's next-gen Reader*
Key Features
Architect robust .NET apps with domain-driven, testable Clean Architecture
Integrate Azure External ID and Key Vault with real-world cases
Apply MediatR, CQRS, and modern .NET practices to streamline architecture
Implement persistence with EF Core using a code-first approach and Clean Architecture boundaries
Purchase of the print or Kindle book includes a free PDF eBook
Book DescriptionLearn how to apply Clean Architecture in real-world .NET applications with Azure in this guide. Designed around an e-commerce project - Project Odyssey, you'll design and build every architectural layer, from core domain logic and application orchestration to infrastructure and presentation.
This book equips you to apply DDD, CQRS, MediatR, and dependency injection, enabling loosely coupled, testable systems. You'll build reusable and modular code structures that scale with your application's complexity and learn how to persist data using EF Core with a code-first approach, managing schema evolution with migrations while keeping infrastructure concerns isolated from your domain logic. Learn how to develop secure systems by integrating Azure External ID, Azure Key Vault, and application-level authentication and authorization.
Gain practical experience with Blazor Server, Razor components, and MudBlazor UI, all integrated within a layered architecture. Learn to enforce business logic boundaries, reduce boilerplate with generic request handlers, and use real-world use cases like payment processing and shopping cart management.
Whether you're new to Clean Architecture or scaling up enterprise solutions, this book provides the patterns, tools, and mindset to succeed.
*Email sign-up and proof of purchase required What you will learn
Design scalable .NET applications with Clean Architecture principles
Structure core logic using use cases, CQRS, and domain modeling
Integrate Azure External ID, Key Vault, and secure service configurations
Use EF Core with a code-first approach to manage database schemas and persistence
Apply MediatR and FluentValidation for streamlined workflows
Build rich UIs using Blazor Server and MudBlazor
Build scalable multi-host applications with structured, transparent service composition
Reduce architectural boilerplate while maintaining structure
Who this book is for.NET developers, software engineers, and solution architects who want to build applications that are easier to understand, test, and evolve over time. This book is a good fit if you're already familiar with C# and .NET, and want a clearer, more practical way to structure real-world applications using Clean Architecture. Basic knowledge of web development and Azure will help you follow along.
More details
Language
English
Place of publication
Birmingham
United Kingdom
Target group
Professional and scholarly
Dimensions
Height: 235 mm
Width: 191 mm
Thickness: 26 mm
Weight
906 gr
ISBN-13
978-1-80512-853-3 (9781805128533)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Persons
Casey Crouse is a seasoned software engineer who has made significant contributions to the field throughout his career. He has a strong background in automation testing, web development, and architecture design, having worked for major brands across different industries. Casey has been a driving force in implementing clean coding and architecture principles in various organizations, and his expertise has been invaluable in helping teams develop robust and scalable applications. With his extensive experience and expertise, Casey has played a key role in developing and maintaining foundational services at Microsoft that underpin some of the company's most critical offerings, including Microsoft Azure. Steve "Ardalis" Smith is an entrepreneur and software developer passionate about building quality software efficiently. A Microsoft ASP.NET MVP, Steve is a prolific speaker and educator, with widely viewed courses on Pluralsight and Dometrain covering DDD, SOLID, design patterns, and software architecture. His company, NimblePros, helps teams avoid technical debt and deliver better software faster. Clients describe his team as a "force multiplier," enhancing the value of internal development teams through mentorship and expert guidance. He also leads DevBetter, a private developer coaching program, which has many positive testimonials from his members.
Content
Table of Contents
Understanding the Limitations of Tightly Coupled Architectures
Introduction to Clean Architecture
Adapting Clean Architecture to .NET
Designing a Clean Architecture Application
Implementing the Core Layer
Implementing the Infrastructure Layer
Implementing the Persistence Layer
Implementing the Presentation Layer with Identity
Building Secure, Testable UI Components for Use Cases
Improving Clean Architecture in .NET with Structured Service Composition
Securing a Clean Architecture Application
Reducing Boilerplate in Clean Architecture Applications
Deploying a Clean Architecture Application in Azure
Managing and Evolving a Clean Architecture Application
Conclusion
Understanding the Limitations of Tightly Coupled Architectures
Introduction to Clean Architecture
Adapting Clean Architecture to .NET
Designing a Clean Architecture Application
Implementing the Core Layer
Implementing the Infrastructure Layer
Implementing the Persistence Layer
Implementing the Presentation Layer with Identity
Building Secure, Testable UI Components for Use Cases
Improving Clean Architecture in .NET with Structured Service Composition
Securing a Clean Architecture Application
Reducing Boilerplate in Clean Architecture Applications
Deploying a Clean Architecture Application in Azure
Managing and Evolving a Clean Architecture Application
Conclusion