public ActionResult GetLivePointsForGrid([DataSourceRequest] DataSourceRequest request) { IList <LivePoint_DTO> livepoint_dto = new List <LivePoint_DTO>(); if (User.IsInRole("Admin")) { livepoint_dto = _iElementRepository.GetLivePoints(); } else { livepoint_dto = _iElementRepository.GetLivePoints(User.Identity.GetUserId()); } DataSourceResult result = livepoint_dto.ToDataSourceResult(request); return(Json(result, JsonRequestBehavior.AllowGet)); }