Esempio n. 1
0
 public AuthorsController(MyComicListContext context, IAddAuthor addCommand, IUpdateAuthor updateCommand, IDeleteAuthor deleteCommand)
 {
     Context            = context;
     this.addCommand    = addCommand;
     this.updateCommand = updateCommand;
     this.deleteCommand = deleteCommand;
 }
 public IActionResult Put(int id, [FromBody] AuthorDto dto, [FromServices] IUpdateAuthor command)
 {
     dto.Id = id;
     _executor.ExecuteCommand(command, dto);
     return(NoContent());
 }