// updated with quantity public ActionResult Index(string category) { string storeLoc = TempData.Peek("adminLoc").ToString(); var products = _storeRepo.GetInventoryOfOneStore(storeLoc); var viewProduct = ViewModelMapper.MapDetailedProductsWithoutTotal(products); if (!String.IsNullOrEmpty(category)) { var foundProducts = _storeRepo.GetInventoryOfOneStoreByCategory(storeLoc, category); viewProduct = ViewModelMapper.MapDetailedProductsWithoutTotal(foundProducts); } return(View(viewProduct)); }