public ActionResult List(DataSourceRequest command, ResourceSearchModel model) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageResource)) { return(AccessDeniedView()); } var query = _resourcesService.GetAllPagedList(model.SearchName, model.SearchStartDate, model.SearchEndDate, command.Page - 1, command.PageSize); var modelList = new List <ResourceListModel>(); PrepareTermListModel(modelList, query); var gridModel = new DataSourceResult { Data = modelList, Total = query.TotalCount }; return(Json(gridModel)); }