public ActionResult Filter() { var model = new FilterViewModel() { FreeIngredients = service.GetFreeIngredients(), UsedIngredients = service.GetUsedIngredients(), PizzaGroups = service.GetFilteredPizzaGroups() }; return View(model); }
public ActionResult ClearFilter() { service.ResetSession(); var model = new FilterViewModel() { FreeIngredients = service.GetFreeIngredients(), UsedIngredients = service.GetUsedIngredients(), PizzaGroups = service.GetFilteredPizzaGroups() }; return RedirectToAction("Filter", model); }
public ActionResult Filter(string ingredient) { if (!string.IsNullOrWhiteSpace(ingredient)) { service.AddUsedIngredient(ingredient); } var model = new FilterViewModel() { FreeIngredients = service.GetFreeIngredients(), UsedIngredients = service.GetUsedIngredients(), PizzaGroups = service.GetFilteredPizzaGroups() }; return View(model); }
public ActionResult RemoveFilter(string ingredient) { service.RemoveUsedIngredient(ingredient); var model = new FilterViewModel() { FreeIngredients = service.GetFreeIngredients(), UsedIngredients = service.GetUsedIngredients(), PizzaGroups = service.GetFilteredPizzaGroups() }; return RedirectToAction("Filter", model); }