Ejemplo n.º 1
0
        public ActionResult ResultSearch(string searchQuery, int selectSearch, int page = 1)
        {
            ResultSearchArticlesViewModel model = new ResultSearchArticlesViewModel
            {
                Articles = articles.GetResultSearch(searchQuery, selectSearch, PageSize, page),
                PageInfo = new PageInfo
                {
                    CurrentPage  = page,
                    ItemsPerPage = PageSize,
                    TotalItems   = articles.GetCountArticlesSearchResult(selectSearch, searchQuery)
                },
                SearchQuery  = searchQuery,
                SelectSearch = selectSearch
            };

            return(View(model));
        }