This chapter focuses on the logic layer of the catalog web service. As previously discussed, the logic will be encapsulated in the Catalog.Domain project. The chapter shows how to implement the application logic using the service classes approach. The aim of these classes is to perform the mapping logic between the requests and the effective entities used on the data source layer and to provide all the additional logic needed by our application. Moreover, we will also see how to test the implemented code in order to verify the behaviors.
This chapter will cover the following topics:
- How to implement the service classes for our application
- How to implement request DTOs and the related validation system
- How to apply tests to verify the implemented logic
The code in the following chapter is available in the following GitHub repository: https://github...