コード例 #1
0
    public async Task <OperationResult> Handle(UpdateImpedimentoTarefaCommand request, CancellationToken cancellationToken)
    {
        _unitOfWork.ImpedimentoTarefaRepository.Update(_mapper.Map <ImpedimentoTarefa>(request.ImpedimentoTarefa));

        bool success = await _unitOfWork.SaveChangesAsync();

        OperationResult result = success ? OperationResult.Success : OperationResult.Failed;

        return(result);
    }
コード例 #2
0
 public async UnaryResult <OperationResult> UpdateAsync(UpdateImpedimentoTarefaCommand command)
 {
     return(await _mediator.Send(command));
 }