Adding the Registration Feature
Since we will start adding logic to our application, this is a good time to add our application layer to the project. As we discussed in the previous chapter, we are designing our application to be layered and abiding by domain-driven design standards.
In domain-driven design, a common approach in layering is Onion Architecture. In onion architecture, each layer can make use of the inside layer but the outside layer has to adapt itself to the inside. And we try to design our application from inside out. That's why we have designed our application starting with entities:
In the preceding figure, we have a domain model at the core, and on top of it we have application services. The purple rectangles are interfaces, the black arrows denote compile-time dependencies, and the magenta circles are external dependencies on infrastructure.
Application Services are for handling commands and requests.
Note
There is an on-going discussion on whether entities in the domain...