public async Task <IActionResult> PutArtist(int id, Artist artist) { if (id != artist.Id) { return(BadRequest()); } try { await _dataAccessLayer.UpdateArtistAsync(artist); } catch (DbUpdateConcurrencyException) { if (!_dataAccessLayer.ArtistExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }