public void UpdateFlight(Flight entity)
 {
     using (FlightReservationEntities db = new FlightReservationEntities())
     {
         db.Entry <Flight>(entity).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
 public int CreateReservation(Reservation entity)
 {
     using (FlightReservationEntities db = new FlightReservationEntities())
     {
         db.Set <Reservation>().Add(entity);
         db.SaveChanges();
     }
     return(entity.Reservation_id);
 }
 public string CreateFlight(Flight entity)
 {
     using (FlightReservationEntities db = new FlightReservationEntities())
     {
         db.Set <Flight>().Add(entity);
         db.SaveChanges();
     }
     return(entity.Flight_id);
 }