-
Book Overview & Buying
-
Table Of Contents
Clean Architecture with .NET
By :
In this chapter, we focused on implementing the Persistence layer of our application and wiring it into the rest of the system in a way that stays true to Clean Architecture. Rather than treating persistence as a purely technical concern, we approached it as a boundary that must be deliberately designed, implemented, and verified.
We began by adopting a code-first mindset with EF Core, defining our persistence model explicitly and keeping it aligned with the domain without leaking database concerns upward. Repositories became the primary integration point between the domain and the database, translating between models and coordinating data access without taking on business behavior. AutoMapper played a supporting role here, helping centralize mapping logic while making those boundaries visible and testable.
We also prepared the application for real-world deployment by configuring Azure SQL Database and understanding how infrastructure choices affect the overall architecture. By...