public HallsController(IAddHallCommand addHall, IGetHallsCommand getHalls, IGetHallCommand getHall, IEditHallCommand editHall, IDeleteHallCommand deleteHall) { this.addHall = addHall; this.getHalls = getHalls; this.getHall = getHall; this.editHall = editHall; this.deleteHall = deleteHall; }
public HallsController(IGetHallsCommand getHalls, IGetHallCommand getHall, IAddHallCommand addHall, IEditHallCommand editHall, IDeleteHallCommand deleteHall, UseCaseExecutor executor) { this.getHalls = getHalls; this.getHall = getHall; this.addHall = addHall; this.editHall = editHall; this.deleteHall = deleteHall; this.executor = executor; }
public IActionResult Put(int id, [FromBody] HallDto dto, [FromServices] IEditHallCommand command) { dto.Id = id; _executor.ExecuteCommand(command, dto); return(NoContent()); }