public void AgregarPaisesDestinoAeropuerto() { Paises_Destino_Aeropuerto pda = new Paises_Destino_Aeropuerto(); pda.id_vuelo = 1; pda.Paises = "Canada"; pda.Destino = " Ottawa"; pda.Aeropuerto = "Aeropuerto Internacional Toronto Pearson"; pda.Tarifa = 322.616; using (AeropuertoEntities context = new AeropuertoEntities()) { context.Paises_Destino_Aeropuerto.Add(pda); context.SaveChanges(); } }
public void Insertar() { Vuelos v1 = new Vuelos(); v1.Id_vuelo = 5; v1.Escala = "xxx"; v1.Duracion = 5; Aviones A1 = new Aviones(); A1.Id = 4; A1.Modelo = "Airbus456"; A1.Asientos = "568"; A1.Cantidad = 684; Paises_Destino_Aeropuerto PDA = new Paises_Destino_Aeropuerto(); PDA.id = 6; PDA.id_vuelo = 5; PDA.Paises = "USA"; PDA.Destino = "New York"; PDA.Aeropuerto = "Juan Santa Maria "; PDA.Tarifa = 564; Pasajeros pj = new Pasajeros(); pj.id = 8; pj.Id_vuelo = 5; pj.Nombre = "Nombre 1"; pj.Apellidos = "Apellidos 1"; pj.Visa = 454221; pj.Pasaporte = 26564; using (AeropuertoEntities context = new AeropuertoEntities()) { context.Vuelos.Add(v1); context.SaveChanges(); } }