public ActionResult List(GridCommand command, DiyGroupListModel model) { var diyGroups = _diyService.GetAllDiyGroups(model.SearchDiyGroupName, command.Page - 1, command.PageSize); var gridModel = new GridModel<DiyGroupModel> { Data = diyGroups.Select(x => { var categoryModel = x.ToModel(); categoryModel.Breadcrumb = x.GetFormattedBreadCrumb(_diyService); return categoryModel; }), Total = diyGroups.TotalCount }; return new JsonResult { Data = gridModel }; }
public ActionResult List() { var model = new DiyGroupListModel(); return View(model); }