public GenresController(MyComicListContext context, IAddGenre addCommand, IUpdateGenre updateCommand, IDeleteGenre deleteCommand)
 {
     Context            = context;
     this.addCommand    = addCommand;
     this.updateCommand = updateCommand;
     this.deleteCommand = deleteCommand;
 }
示例#2
0
 public IActionResult Put(int id, [FromBody] GenreDto dto, [FromServices] IUpdateGenre command)
 {
     dto.Id = id;
     executor.ExecuteCommand(command, dto);
     return(StatusCode(StatusCodes.Status204NoContent));
 }