private void Dispose(bool disposing) { if (!disposing) { return; } if (_disposed) { return; } if (_transaction != null) { _transaction.Dispose(); _transaction = null; } if (_entityFrameworkContext != null) { _entityFrameworkContext.Dispose(); _entityFrameworkContext = null; } _disposed = true; }
/// <summary> /// Disposes off the managed and unmanaged resources used. /// </summary> /// <param name="disposing"></param> private void Dispose(bool disposing) { if (!disposing) { return; } if (_disposed) { return; } if (_transaction != null) { _transaction.Dispose(); _transaction = null; } if (_session != null) { _session.Dispose(); _session = null; } _disposed = true; }