public async Task <Result <int> > Handle(DeleteClaimCommand command, CancellationToken cancellationToken) { var product = await _claimRepository.GetByIdAsync(command.Id); await _claimRepository.DeleteAsync(product); await _unitOfWork.Commit(cancellationToken); return(Result <int> .Success(product.Id)); }
public async Task <bool> Handle(DeleteClaimCommand command, CancellationToken cancellationToken) { return(await _claimRepository.DeleteAsync(command.ClaimId)); }