Пример #1
0
 public void AddNewIngre(IngredientModel i)
 {
     db.Ingredients.Create(new Ingredient()
     {
         Name = i.Name,
         Cost = i.Cost
     });
 }
Пример #2
0
 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);
     }
 }