Exemplo n.º 1
0
 public void AddReview(Review review)
 {
     using (DrinkContext db = new DrinkContext())
     {
         try
         {
             db.Reviews.Add(review);
             db.SaveChanges();
         }
         catch (Exception e)
         { Console.WriteLine(e.ToString()); }
     }
 }
Exemplo n.º 2
0
 public void AddDrink(Drink drink)
 {
     using (DrinkContext db = new DrinkContext())
     {
         try
         {
             db.Drinks.Add(drink);
             db.SaveChanges();
         }
         catch (Exception e)
         { Console.WriteLine(e.ToString()); }
     }
 }
Exemplo n.º 3
0
 public void AddStore(CoffeeStore cs)
 {
     using (DrinkContext db = new DrinkContext())
     {
         try
         {
             db.CoffeeStores.Add(cs);
             db.SaveChanges();
         }
         catch (Exception e)
         { Console.WriteLine(e.ToString()); }
     }
 }
Exemplo n.º 4
0
 public void AddStore(CoffeeStore cs)
 {
     using (DrinkContext db = new DrinkContext())
     {
         try
         {
             db.CoffeeStores.Add(cs);
             db.SaveChanges();
         }
         catch (Exception e)
         { Console.WriteLine(e.ToString()); }
     }
 }
Exemplo n.º 5
0
 public void AddReview(Review review)
 {
     using (DrinkContext db = new DrinkContext())
     {
         try
         {
             db.Reviews.Add(review);
             db.SaveChanges();
         }
         catch (Exception e)
         { Console.WriteLine(e.ToString()); }
     }
 }
Exemplo n.º 6
0
 public void AddDrink(Drink drink)
 {
     using (DrinkContext db = new DrinkContext())
     {
         try
         {
             db.Drinks.Add(drink);
             db.SaveChanges();
         }
         catch (Exception e)
         { Console.WriteLine(e.ToString()); }
     }
 }