public async Task <IActionResult> List(int page = 1, int pageSize = 10, string title = "") { string where = $" and type={(int)Entity.CommentType.抢购评论}" + _comService.GetWhere(); if (!string.IsNullOrEmpty(title)) { where += $" and a.title like '%{title}%' "; } int total; DataSet ds = _Service.GetPage(page, pageSize, "c.Praise desc,c.id desc", out total, where); IPagedList pageList = new PagedList <DataRow>(ds.Tables[0].Select(), page, pageSize, total); ViewBag.PageSize = pageSize; if (Request.Headers.ContainsKey("x-requested-with")) { return(View("_Table", pageList)); } return(View(pageList)); }