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; }