示例#1
0
        /// <summary>
        /// 显示新闻列表。
        /// </summary>
        /// <param name="so">查询条件</param>
        /// <returns>显示界面</returns>
        public ActionResult Index(NewsSO so)
        {
            this.ViewBag.SO = so;
            var model = this.NewsService.SearchNews(so);

            return View(model);
        }
示例#2
0
        /// <summary>
        /// 查询并分页获取新闻信息。
        /// </summary>
        /// <param name="so">查询条件</param>
        /// <returns>返回新闻的分页查询结果</returns>
        public ResponseSet<News> SearchNews(NewsSO so)
        {
            so = so ?? new NewsSO();

            return this.InvokePagingService(
                nameof(SearchNews),
                (out int totalRecords) => this.Persistence.QueryForPaginatedList<News>(NS, "SearchNews", out totalRecords, so), so);
        }