Пример #1
0
 public ActionResult IncrementIngredient(PizzaModel pizzaModel)
 {
     ServiceUser currentUser = ServiceUserRepository.Instance.GetUserByName(User.Identity.Name);
     PizzaIngredientRepository.Instance.IncrementCount(currentUser.Id, pizzaModel.PizzaId, pizzaModel.Ingredient.Id);
     return Json("Ingredient incremented succesfully");
 }
Пример #2
0
 public ActionResult AddIngredient(PizzaModel pizzaModel)
 {
     ServiceUser currentUser = ServiceUserRepository.Instance.GetUserByName(User.Identity.Name);
     PizzaIngredientRepository.Instance.AddPizzaIngredient(currentUser.Id, pizzaModel.PizzaId, pizzaModel.Ingredient);
     return Json("Ingredient added succesfully");
 }