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); }
public async UnaryResult <OperationResult> UpdateAsync(UpdateImpedimentoCommand command) { return(await _mediator.Send(command)); }