Defining the application architecture
The application will be implemented with the Domain-Driven Design (DDD) approach and associated patterns described in Chapter 7, Understanding the Different Domains in Software Solutions, and Chapter 13, Interacting with Data in C# – Entity Framework Core, so having a good understanding of the content covered in those chapters is a fundamental prerequisite to reading this chapter.
The application is organized based on a DDD approach and uses SOLID principles to map your domain sections. That is, the application is organized into three layers, each implemented as a different project:
- There’s a domain layer, which contains the repository’s implementation and the classes describing database entities. It is a .NET library project. However, since it needs some interfaces, like
IServiceCollection
, which are defined inMicrosoft.NET.Sdk.web
, and since theDBContext
layer must inherit from the identity framework in...