public void SaveAirline(IEnumerable <Airline> p_airlines)
 {
     using (var db = new FlightsContext())
     {
         db.Airlines.AddRange(p_airlines);
         db.SaveChanges();
     }
 }
 public void SaveFlights(IEnumerable <Flight> p_flights)
 {
     using (var db = new FlightsContext())
     {
         db.Flights.AddRange(p_flights);
         db.SaveChanges();
     }
 }
 public void SaveCities(IEnumerable <Country> p_countries)
 {
     using (var db = new FlightsContext())
     {
         db.Countries.AddRange(p_countries);
         db.SaveChanges();
     }
 }
 public void RemoveAll()
 {
     using (var db = new FlightsContext())
     {
         var rows = from o in db.Flights
                    select o;
         foreach (var row in rows)
         {
             db.Flights.Remove(row);
         }
         db.SaveChanges();
     }
 }