Пример #1
0
        public async Task Exec(string fromAccountAgency, string fromAccountNumber, string toAccountAgency, string toAccountNumber, decimal value)
        {
            using (var transaction = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                await _withdrawService.ExecWithNoTransactionAsync(fromAccountAgency, fromAccountNumber, value);

                await _depositSvc.ExecWithNoTransactionAsync(toAccountAgency, toAccountNumber, value);

                transaction.Complete();
            }
        }