protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { //zamknięcie połączenia z bazą danych db.Dispose(); } base.Dispose(disposing); }
protected virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { context.Dispose(); } } this.disposed = true; }
private void Dispose(bool disposing) { if (!disposed) { if (disposing) { db.Dispose(); // free the locked ressources } } disposed = true; }
protected override void Dispose_context() { RunWithoutException(CleanupActionsAfterTest); RunWithoutException(() => Context.SaveChanges()); RunWithoutException(() => Context?.Dispose()); }