public ActionResult Index() { AllProductVM allProduct = new AllProductVM(); allProduct.Products = ProductsService.Instance.GetAllProducts().Take(9).ToList(); return(View(allProduct)); }
public ActionResult Index() { AllProductVM allProductVM = new AllProductVM { Categories = repoCategory.GetAll().Include(i => i.Children).Include(i => i.Products).ToList(), Brands = repoBrand.GetAll().Include(i => i.Products).ToList(), Products = repoProduct.GetAll().Include(i => i.Author).Include(i => i.Pictures).ToList() }; ViewBag.PageTitle = "- Kategoriler"; return(View(allProductVM)); }