示例#1
0
        public async Task <IActionResult> PutAsync(int id, [FromBody] ArtistInputModel value)
        {
            if (value == null)
            {
                return(BadRequest("Invalid input"));
            }

            var result = await _artistsService.UpdateAsync(id, value);

            if (result == null)
            {
                return(BadRequest($"Update of artist {id} failed"));
            }

            return(Ok(result));
        }