December 2019
Intermediate to advanced
510 pages
11h 33m
English
As we explained in the previous chapter, we are using the FluentValidation package to implement the validation mechanism of the web service. Since we have built the service interfaces to handle the Artist and Genre entities, it is now possible to improve the validation checks already present in the AddItemRequestValidator and EditItemRequestValidator classes. Now, we are going to implement the existence check for the Artist- and Genre-related entities.
Let's start by extending the implementation of the AddItemRequestValidator class:
using System;using FluentValidation;using System.Threading.Tasks;using Catalog.Domain.Requests.Artists;using Catalog.Domain.Requests.Genre;using Catalog.Domain.Services;namespace ...