public bool InsertIngredient(Ingredient p) { try { context.Ingredient.Add(p); context.SaveChanges(); return(true); } catch { } return(false); }
public bool InsertPizza(Pizza p) { try { context.Pizza.Add(p); context.SaveChanges(); return(true); } catch { } return(false); }
public bool InsertIngredientToPizza(int pizzaId, int ingredientId, int quantite) { context.PizzaIngredients.Add(new PizzaIngredients { PizzaId = pizzaId, IngredientId = ingredientId, Quantite = quantite }); try { context.SaveChanges(); return(true); } catch { } return(false); }