internal MenuPizzasViewModel ShowAllPizzas() { MenuPizzasViewModel viewModel = new MenuPizzasViewModel() { PizzaSuggestions = this.context.Pizzas.ToList() }; return(viewModel); }
public IActionResult <MenuPizzasViewModel> Index(HttpSession currentSession, HttpResponse response) { if (!this.signInManger.IsAuthenticated(currentSession)) { this.Redirect(response, "/home/index"); return(null); } MenuPizzasViewModel viewModel = this.pizzasService.ShowAllPizzas(); return(this.View(viewModel)); }