public ActorsController(IGetActorsCommand getActors, ICreateActorCommand createActor, IDeleteActorCommand deleteActor, IGetOneActorCommand getOneActor) { this.getActors = getActors; this.createActor = createActor; this.deleteActor = deleteActor; this.getOneActor = getOneActor; }
public IActionResult Post([FromBody] ActorDto dto, [FromServices] ICreateActorCommand command) { executor.ExecuteCommand(command, dto); return(StatusCode(StatusCodes.Status201Created)); }