public AuthorsController(MyComicListContext context, IAddAuthor addCommand, IUpdateAuthor updateCommand, IDeleteAuthor deleteCommand) { Context = context; this.addCommand = addCommand; this.updateCommand = updateCommand; this.deleteCommand = deleteCommand; }
public IActionResult Delete(int id, [FromServices] IDeleteAuthor command) { _executor.ExecuteCommand(command, id); return(NoContent()); }