Exemple #1
0
        public IActionResult ProductOverview(char id, string link, ProductProductOverviewVM filteredVM)
        {
            ProductProductOverviewVM overviewVM;

            if (filteredVM.ShouldFilter == false)
            {
                overviewVM = webShopDBContext.GetOverview(id, link);
            }
            else
            {
                ProductProductOverviewVM filteredProductsVM = webShopDBContext.GetFiltered(filteredVM);
                webShopDBContext.SetSelectListItems(filteredProductsVM);
                overviewVM = filteredProductsVM;
            }

            return(View(overviewVM));
        }