public async Task <Result <int> > Handle(CreateExpenseClaimCommand request, CancellationToken cancellationToken) { var expenseClaim = _mapper.Map <ExpenseClaim>(request); await _repository.InsertAsync(expenseClaim); await _unitOfWork.Commit(cancellationToken); return(Result <int> .Success(expenseClaim.Id)); }
public async Task <Response <int> > Handle(CreateExpenseClaimCommand request, CancellationToken cancellationToken) { var claim = _mapper.Map <ExpenseClaim>(request); await _claimRepository.InsertAsync(claim); await _unitOfWork.Commit(cancellationToken); return(new Response <int>(claim.Id)); }