Ejemplo n.º 1
0
        public IActionResult SearchProduct(string searchProduct, int page = 1, int pageSize = 9)
        {
            ViewBag.SearchName = searchProduct;
            ViewBag.DomainApi  = _config["DomainApi:Domain"];
            List <ProductViewModel>            products      = _productService.GetAllByNamePaging(searchProduct, page, pageSize, out int totalRows);
            WebResultPaging <ProductViewModel> resultPagging = new WebResultPaging <ProductViewModel>()
            {
                Items     = products,
                PageIndex = page,
                PageSize  = pageSize,
                TotalRows = totalRows,
            };

            return(View(resultPagging));
        }
Ejemplo n.º 2
0
 public BlogIndexViewModel()
 {
     ResultPagging = new WebResultPaging <BlogViewModel> {
     };
 }