public async Task <ActionResult> Post([FromBody] ArtistDetailsDto artist) { try { await _artistService.AddArtistAsync(artist).ConfigureAwait(true); } catch (ValidationException) { return(ValidationProblem()); } return(Created(nameof(Get), null)); }
public async Task <IActionResult> Post(AddArtistRequest request) { var result = await _artistService.AddArtistAsync(request, CancellationToken.None); return(CreatedAtAction(nameof(GetById), new { id = result.ArtistId }, null)); }
public async Task <IActionResult> Post(AddArtistRequest request) { ArtistResponse result = await _artistService.AddArtistAsync(request); return(CreatedAtAction(nameof(GetById), new { id = result.ArtistId }, null)); }