public ActionResult List(GridCommand command, NewsExListModel model) { var newsExs = _newsExService.GetAllNewsExs(model.SearchNewsExName,pageIndex: command.Page - 1,pageSize: command.PageSize); var gridModel = new GridModel<NewsExModel> { Data = newsExs.Select(x => { var m = x.ToModel(); m.CreatedOn = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc); return m; }), Total = newsExs.TotalCount }; return new JsonResult { Data = gridModel }; }
public ActionResult List() { var model = new NewsExListModel(); return View(model); }