public GenresController(MyComicListContext context, IAddGenre addCommand, IUpdateGenre updateCommand, IDeleteGenre deleteCommand) { Context = context; this.addCommand = addCommand; this.updateCommand = updateCommand; this.deleteCommand = deleteCommand; }
public IActionResult Delete(int id, [FromServices] IDeleteGenre command) { executor.ExecuteCommand(command, id); return(StatusCode(StatusCodes.Status204NoContent)); }