public async Task <ActionResult <ArtistResource> > CreateArtist([FromBody] SaveArtistResource saveArtistResource) { var validator = new SaveArtistResourceValidator(); var validatorResult = await validator.ValidateAsync(saveArtistResource); if (!validatorResult.IsValid) { return(BadRequest(validatorResult.Errors)); } var artistToCreate = _mapper.Map <SaveArtistResource, Artist>(saveArtistResource); var newArtist = await _artistService.CreateArtisit(artistToCreate); var artist = await _artistService.GetArtistById(newArtist.Id); var artistResource = _mapper.Map <Artist, ArtistResource>(artist); return(Ok(artistResource)); }