Пример #1
0
        protected ITransaction BeginTransaction()
        {
            DebugContract.Requires(Session.Current);

            var tx = CurrentTransaction;

            if (tx == null)
            {
                tx = new HypergraphTransaction(_indexManager);
                CurrentTransaction = tx;
                CurrentTransaction.UpdateProfiler(p => p.NumberOfTransactions.Incr());
            }
            else
            {
                // Nested
                tx.PushNestedTransaction();
            }
            return(tx);
        }