public async Task <ActionResult <ArtistResource> > PostAsync([FromBody] SaveArtistResource input) { if (!ModelState.IsValid) { return(BadRequest(ModelState.GetErrorMessages())); } var artist = _mapper.Map <SaveArtistResource, Artist>(input); var result = await _supervisor.AddArtistAsync(artist); if (!result.Success) { return(BadRequest(new ErrorResource(result.Message))); } var artistResource = _mapper.Map <Artist, ArtistResource>(result.Artist); return(StatusCode(201, artistResource)); }