protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         interaction.Dispose();
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Beispiel #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (db != null)
         {
             db.Dispose();
         }
         if (context != null)
         {
             context.Dispose();
         }
     }
 }
Beispiel #3
0
 public void CloseDbConnections()
 {
     ctx.Dispose();
 }
Beispiel #4
0
 private void onFormClose(object sender, FormClosingEventArgs e)
 {
     db.Dispose();
 }