private static void UpdateTrip() { using (var context = new BreakAwayContext()) { var trip = context.Trips.FirstOrDefault(); trip.CostUSD = 750; context.SaveChanges(); } }
private static void InserPerson() { var person = new Person { Firstname = "Rowne", LastName = "Miller", SocialSecurityNumber = 12345678 }; using (var context = new BreakAwayContext()) { context.Persons.Add(person); context.SaveChanges(); } }
private static void InserTrip() { var trip = new Trip { CostUSD = 800, StartDate = new DateTime(2011, 9, 1), EndDate = new DateTime(2011, 9, 14) }; using (var context = new BreakAwayContext()) { context.Trips.Add(trip); context.SaveChanges(); } }
private static void InserDestination() { var destination = new Destination { Country = "Indonesia", Description = "EcoTourism at its best in exquisite Bali", Name = "Bali" }; using (var context = new BreakAwayContext()) { context.Destinations.Add(destination); context.SaveChanges(); } }