Exemple #1
0
        private IOuterTransaction ObtainTransaction(
            OuterTransactionMode transaction,
            OuterTransactionIsolationLevel level)
        {
            if (_tranManager == null)
            {
                return(new FakeOuterTransaction(level));
            }

            if (transaction == OuterTransactionMode.DbTransaction)
            {
                return(_tranManager.BeginDbTransaction(level));
            }
            if (transaction == OuterTransactionMode.TransactionScope)
            {
                return(_tranManager.BeginDbTransaction(level));
            }
            return(new FakeOuterTransaction(level));
        }