Exemplo n.º 1
0
        public async Task <CountResult> OmitAsync(OmitSource source, CancellationToken token = default(CancellationToken))
        {
            var result = new CountResult {
                ProcessResult = new ProcessResult()
            };

            using (var scope = transactionScopeBuilder.Create())
            {
                foreach (var transaction in source.Transactions)
                {
                    var omitResult = await billingQueryProcessor.OmitAsync(source.DoDelete? 1 : 0, source.LoginUserId, transaction);

                    if (omitResult == 0)
                    {
                        result.ProcessResult.ErrorCode = Rac.VOne.Common.ErrorCode.OtherUserAlreadyUpdated;
                        return(result);
                    }
                    result.Count += omitResult;
                }
                result.ProcessResult.Result = true;
                scope.Complete();
            }
            return(result);
        }
Exemplo n.º 2
0
 public async Task <CountResult> Omit(OmitSource source, CancellationToken token)
 => await receiptProcessor.OmitAsync(source, token);
Exemplo n.º 3
0
 public async Task <ActionResult <CountResult> > Omit(OmitSource source, CancellationToken token)
 => await billingProcessor.OmitAsync(source, token);