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