-
Book Overview & Buying
-
Table Of Contents
Clean Architecture with .NET
By :
Welcome to Chapter 7, where we implement the Persistence layer for Project Odyssey using Clean Architecture principles. In earlier chapters, we defined Application-layer abstractions that describe how our system interacts with data. In this chapter, we bring those abstractions to life by providing their concrete persistence implementations.
Since this application will ultimately be deployed to Azure, our persistence implementation targets Azure SQL Server as the production database. We use Entity Framework Core (EF Core) with a code-first approach to map our domain entities to a relational schema while keeping all infrastructure concerns isolated from the core application.
Testing remains a first-class concern. We'll validate the Persistence layer using xUnit, NSubstitute, and Docker, ensuring our data access logic is both testable and trustworthy. By the end of the chapter, you'll have a clear, practical foundation for persistence that integrates...