public void AddReview(Review review) { using (DrinkContext db = new DrinkContext()) { try { db.Reviews.Add(review); db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }
public void AddDrink(Drink drink) { using (DrinkContext db = new DrinkContext()) { try { db.Drinks.Add(drink); db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }
public void AddStore(CoffeeStore cs) { using (DrinkContext db = new DrinkContext()) { try { db.CoffeeStores.Add(cs); db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }
public void AddStore(CoffeeStore cs) { using (DrinkContext db = new DrinkContext()) { try { db.CoffeeStores.Add(cs); db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }
public void AddReview(Review review) { using (DrinkContext db = new DrinkContext()) { try { db.Reviews.Add(review); db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }
public void AddDrink(Drink drink) { using (DrinkContext db = new DrinkContext()) { try { db.Drinks.Add(drink); db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }