public static void eliminarAvion(int id) { //DataContext dc = new DataContext(myConnection.getConnection()); var elimina = dc.GetTable <tablaAvion>(); var aviones = from a in elimina where a.ID_AVION.Equals(id) select a; foreach (var item in aviones) { elimina.DeleteOnSubmit(item); dc.SubmitChanges(); } eliminarAsientos(id); Vuelo.eliminarVuelo(id); }