Towards cleaner and more maintainable code
At the end of our journey, our goal is to refactor the application toward an architecture such as that in Figure 5.5.

Figure 5.5 – The end result of our refactoring process
This is a well-organized code base. You should have already noticed that we used numbers in the solution folders’ names. We usually do this to clearly indicate the level of every layer of our application and, in our opinion, this follows the Onion Architecture pattern more closely. The solution
folder we are referring to is just a logical folder that you can create to organize your projects inside IDEs such as Microsoft Visual Studio or JetBrains Rider. Obviously, you can easily achieve the same result with other frameworks and languages by using physical folders instead of logical ones.
A well-organized code base benefits all team members, including newcomers. It immediately clarifies the separation of concerns when opening the solution...