Beispiel #1
0
 public void Dispose()
 {
     if (db != null)
     {
         db.Dispose();
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Beispiel #3
0
 public void Dispose()
 {
     ctx?.Dispose();
 }
Beispiel #4
0
 public void Dispose()
 {
     _db?.Dispose();
 }
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     context.Dispose();
 }
Beispiel #6
0
 public void Dispose()
 {
     _context?.Dispose();
 }
Beispiel #7
0
 protected override void OnClosed(EventArgs e)
 {
     base.OnClosed(e);
     context.Dispose();
 }
Beispiel #8
0
 private void InvForm_Closed(object sender, FormClosedEventArgs e) // Убиваем сущностный объект
 {
     _autoLotEntities.Dispose();
 }