Exemplo n.º 1
0
 private static void UpdateTrip()
 {
     using (var context = new BreakAwayContextFluent())
     {
         var record = context.Trips.FirstOrDefault();
         record.CostUSD = 750;
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
 private static void InsertDestination()
 {
     Destination newDestination = new Destination()
     {
         Name = "Test",
         Description = "DropDatabaseTest",
         Country = "Localhost"
     };
     using (var context = new BreakAwayContextFluent())
     {
         context.Destinations.Add(newDestination);
         context.SaveChanges();
     }
 }
Exemplo n.º 3
0
 private static void InsertResort()
 {
     var resort=new Resort()
     {
         Name = "Grand Canyon",
         Activities = "Sightseeing, Hiking",
         IsResort = true,
         MilesFromAirport = 100
     };
     using (var context = new BreakAwayContextFluent())
     {
         context.Lodgings.Add(resort);
         context.SaveChanges();
     }
 }