Exemplo n.º 1
0
 public void InsertsDestination(Destination destination)
 {
     using (var context = new BreakAwayContext())
     {
         context.Destinations.Add(destination);
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
        public void TearDown()
        {
            // Cleaning database
             using (var context = new BreakAwayContext())
             {
                 var allDestinations = context.Destinations.ToList();
                 foreach (var destination in allDestinations)
                 {
                     context.Destinations.Remove(destination);
                 }
                 context.SaveChanges();

             }
        }