The core layer – directory
The core layer is the center of clean architecture. We will implement this as a directory or folder inside a Visual Studio solution that can be created using the .NET Core CLI. All other project dependencies must point toward the core to the domain and application project to be specific. Similarly, the core layer will never depend on any other layers.
To set up the core layer, we need two projects – the Domain
and Application
projects.
Domain – project
This clean architecture part is a .NET Standard 2.1 class library project with entities, interfaces, enums, DTOs, and so on.
The Domain
project must have an empty project reference, which shows that it does not have any dependencies on any project.
Application – project
This part of the clean architecture is also a .NET Standard 2.1 class library project. It has defined interfaces, but the implementations are outside of this layer. This project also has the command...