public void Dispose(bool disposing) { if (disposing) { _context.Dispose(); } }
protected virtual void Dispose(bool disposing) { if (disposing) { _libraryDbContext?.Dispose(); } }
protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { _context.Dispose(); } } _disposed = true; }
protected virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { DbContext.Dispose(); } } this.disposed = true; }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { // TODO: dispose managed state (managed objects). _dbContext.Dispose(); } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }