Ejemplo n.º 1
0
 public bool Add(Airplane entity)
 {
     try
     {
         using (var database = new MagoModelEntity())
         {
             database.Airplanes.Add(entity);
             database.SaveChanges();
             return(true);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool Add(Reservation reservation)
 {
     try
     {
         using (var database = new MagoModelEntity())
         {
             database.Reservations.Add(reservation);
             database.SaveChanges();
             return(true);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
 }