Ejemplo n.º 1
0
        public void Dispose()
        {
            if (_innerScope != null)
            {
                // De-register this scope as the primary transaction so others can be created
                _transactionScopeManager?.DeregisterTransaction(this);

                // Dispose of the EF transaction which should tidy itself up.
                _innerScope.Dispose();
            }
        }
        private void DisposeInnerScope()
        {
            if (_innerScope != null)
            {
                var scopeToDispose = _innerScope;
                _innerScope = null;

                // De-register this scope as the primary transaction so others can be created
                _transactionScopeManager?.DeregisterTransaction(this);

                // Dispose of the EF transaction which should tidy itself up.
                scopeToDispose.Dispose();
            }
        }