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"); }
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"); }