コード例 #1
0
 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 Delete(int id, [FromServices] IDeleteGenre command)
 {
     executor.ExecuteCommand(command, id);
     return(StatusCode(StatusCodes.Status204NoContent));
 }