// GET: Products public ActionResult Index() { var pim = new ProductsIndexModel(); var repo = new ProductsRepository(); pim.Categories = repo.AllCategories().ToList(); pim.Products = repo.AllProducts().ToList(); return(View(pim)); }