public IActionResult Put(int id, [FromBody] AuthorUpdateDTO author) { try { author.Id = id; updateCommand.Execute(author); return(NoContent()); } catch (EntityNotFoundException e) { return(NotFound(new ErrorMessage { Message = e.Message })); } }
public IActionResult Put(int id, [FromBody] AuthorUpdateDTO author) { try { author.Id = id; updateCommand.Execute(author); return(NoContent()); } catch (EntityNotFoundException e) { return(NotFound(new ErrorMessage { Message = e.Message })); } }