コード例 #1
0
        private void Dispose(bool isDisposing)
        {
            bool canDispose = (!_isDisposed) && isDisposing;

            if (canDispose)
            {
                foreach (DbCommandWrapper commandWrapper in _commandWrappersDataAdapter.Values)
                {
                    commandWrapper.Dispose();
                }
                if (_daScopeContextIsCreatedInThisInstance && _daScopeContext != null)
                {
                    _daScopeContext.Dispose();
                }
            }
            _isDisposed = true;
        }