December 2019
Intermediate to advanced
510 pages
11h 33m
English
The Catalog.Domain project also owns the validation logic of our request models. In this section, we will see how to implement the request validation logic part, which will be also used by our controllers in order to validate the incoming data. Here, I usually rely on the FluentValidation package, which provides a really readable way to perform validation checks on every type of object and data structure.
In order to add the FluentValidation package to our Catalog.Domain project, we can execute the following commands in the project folder:
dotnet add package FluentValidationdotnet add package FluentValidation.AspNetCore
The FluentValidation package exposes the AbstractValidation class, which can be extended ...
Read now
Unlock full access