Пример #1
0
 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);
 }
Пример #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             context.Dispose();
         }
     }
     this.disposed = true;
 }
Пример #4
0
 private void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             db.Dispose(); // free the locked ressources
         }
     }
     disposed = true;
 }
Пример #5
0
 protected override void Dispose_context()
 {
     RunWithoutException(CleanupActionsAfterTest);
     RunWithoutException(() => Context.SaveChanges());
     RunWithoutException(() => Context?.Dispose());
 }