public ActionResult List(JQueryDataTableParamModel command) { if (!Request.IsAjaxRequest()) return RedirectToAction(SystemRouteNames.Index); string cacheKey = ModelCacheEventUser.OFFICE_MODEL_KEY.FormatWith( "List"); var cacheModel = cacheManager.Get(cacheKey, () => { var offices = dataService.GetAll(PublishingStatus.All) .Select(office => PrepareBranchOfficeModel(office)); return offices; }); return Json(new DataTablesParser<BranchOfficeModel>(Request, cacheModel).Parse()); }
public ActionResult List(JQueryDataTableParamModel command) { if (!Request.IsAjaxRequest()) return RedirectToAction(SystemRouteNames.Index); string cacheKey = ModelCacheEventUser.COMPANY_MODEL_KEY.FormatWith( "List"); var cacheModel = cacheManager.Get(cacheKey, () => { var companies = companyService.GetAll(PublishingStatus.All) .Select(company => PrepareCompanyMode(company)); return companies; }); return Json(new DataTablesParser<CompanyModel>( Request, cacheModel ).Parse() ); }
public ActionResult List(JQueryDataTableParamModel command) { if (!Request.IsAjaxRequest()) return RedirectToAction(SystemRouteNames.Index); string cacheKey = ModelCacheEventUser.USERS_MODEL_KEY.FormatWith( "List"); var cacheModel = cacheManager.Get(cacheKey, () => { var clients = userService.GetAll(PublishingStatus.All) .Select(client => PrepareUserModel(client)); return clients; }); return Json(new DataTablesParser<UserModel>(Request, cacheModel).Parse()); }