public async Task <OperationResult> Handle(UpdateApontamentoCommand request, CancellationToken cancellationToken = default)
    {
        _unitOfWork.ApontamentoRepository.Update(_mapper.Map <Apontamento>(request.Apontamento));

        bool success = await _unitOfWork.SaveChangesAsync();

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

        return(result);
    }
Exemple #2
0
 public async UnaryResult <OperationResult> UpdateAsync(UpdateApontamentoCommand command)
 {
     return(await _mediator.Send(command));
 }