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

        bool success = await _unitOfWork.SaveChangesAsync();

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

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