public PublishersController(MyComicListContext context, IGetPublishers getCommand, IAddPublisher addCommand, IUpdatePublisher updateCommand, IDeletePublisher deleteCommand) { Context = context; this.getCommand = getCommand; this.addCommand = addCommand; this.updateCommand = updateCommand; this.deleteCommand = deleteCommand; }
public IActionResult Delete(int id, [FromServices] IDeletePublisher command) { _executor.ExecuteCommand(command, id); return(NoContent()); }