public ActorsController(IGetActorsCommand getActors, ICreateActorCommand createActor, IDeleteActorCommand deleteActor, IGetOneActorCommand getOneActor) { this.getActors = getActors; this.createActor = createActor; this.deleteActor = deleteActor; this.getOneActor = getOneActor; }
public ActorsController(IAddActorCommand addActorCommand, IGetActorsCommand getActorsCommand, IGetActorCommand getActorCommand, IEditActorCommand editActorCommand, IDeleteActorCommand deleteActorCommand) { this.addActorCommand = addActorCommand; this.getActorsCommand = getActorsCommand; this.getActorCommand = getActorCommand; this.editActorCommand = editActorCommand; this.deleteActorCommand = deleteActorCommand; }
public ActorsController(IAddActorCommand addActors, IGetActorsCommand getActors, IGetActorCommand getActor, IEditActorCommand editActor, IDeleteActorCommand deleteActor) { this.addActors = addActors; this.getActors = getActors; this.getActor = getActor; this.editActor = editActor; this.deleteActor = deleteActor; }
//[Authorize] public IActionResult Delete(int id, [FromServices] IDeleteActorCommand command) { executor.ExecuteCommand(command, id); return(StatusCode(StatusCodes.Status204NoContent)); }