// GET: Shop public ActionResult Index(int categoryid = 0, int colorid = 0, string name = "") { ViewBag.category = category.GetAll(); ViewBag.colors = color.GetAll(); if (categoryid != 0) { return(View(product.GetProductsByCategory(categoryid))); } if (colorid != 0) { return(View(product.GetProductsByColor(colorid))); } return(View(product.GetAll())); }