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);
    }
Пример #2
0
 public async UnaryResult <OperationResult> UpdateAsync(UpdateWorkflowCommand command)
 {
     return(await _mediator.Send(command));
 }