public Task <MoveSwimlaneCommandResult> Move(MoveSwimlaneCommand command) { Task <MoveSwimlaneCommandResult> result; result = _mediator.Send(command); return(result); }
public ActionResult <SwimLaneMoveOutput> Move(SwimLaneMoveInput input) { MoveSwimlaneCommand command = _mapper.Map <SwimLaneMoveInput, MoveSwimlaneCommand>(input); Task <MoveSwimlaneCommandResult> result = _swimLaneService.Move(command); SwimLaneMoveOutput resultValue = _mapper.Map <MoveSwimlaneCommandResultItem, SwimLaneMoveOutput>(result.Result.ResultObject.Data); if (result.Result.ResultObject.Success) { return(Ok(resultValue)); } else { return(BadRequest(resultValue)); } }