public async Task <IActionResult> Search(int page = 1, string Search = null) { IEnumerable <Product> listProduct = null; if (Search != null) { listProduct = await productBLL.Get(ViewHelpers.NumberPerPageFront, page, filter : p => p.Model.Contains(Search), orderBy : p => p.OrderByDescending(product => product.EditedDate)); ViewBag.page = page; int totalCount = productBLL.Cout(p => p.Model.Contains(Search)); ViewBag.totalpage = ViewHelpers.TotalPage(totalCount, ViewHelpers.NumberPerPageFront); } return(View("~/Views/Shop/ShopAll.cshtml", listProduct)); }