public IActionResult BrandListing()
        {
            if (HttpContext.GetLoggedUser() != null)
            {
                TempData["logged"] = "True";
            }

            BrandListingVM hm = new BrandListingVM
            {
                Rows = con.Categories.Select(x => new BrandListingVM.Row
                {
                    ProductName = x.CategoryName,
                    Route       = x.ImageRoute,
                    CategoryId  = x.Id
                }).ToList(),
            };

            return(View(hm));
        }
        //search bar
        public IActionResult Search(HomePageIndexVM modelH = null, BrandListingVM modelB = null, ProductListingVM modelP = null)
        {
            string search = null;

            if (modelH.Search != null)
            {
                search = modelH.Search;
            }

            else if (modelB.Search != null)
            {
                search = modelB.Search;
            }

            else if (modelP.Search != null)
            {
                search = modelP.Search;
            }

            return(RedirectToAction("ProductListing", new { search = search }));
        }