public void AddNewIngre(IngredientModel i) { db.Ingredients.Create(new Ingredient() { Name = i.Name, Cost = i.Cost }); }
public bool UpdateIngre(IngredientModel i) { DAL.Ingredient ingre = db.Ingredients.GetItem(i.ID); ingre.Name = i.Name; ingre.Name = i.Name; if (Save()) { return(true); } else { return(false); } }