public async Task <OperationResult> Handle(UpdateWorkflowCommand request, CancellationToken cancellationToken) { _unitOfWork.WorkflowRepository.Update(_mapper.Map <Workflow>(request.Workflow)); bool success = await _unitOfWork.SaveChangesAsync(); OperationResult result = success ? OperationResult.Success : OperationResult.Failed; return(result); }
public async UnaryResult <OperationResult> UpdateAsync(UpdateWorkflowCommand command) { return(await _mediator.Send(command)); }