private StatsStudySet GetStatsStudySet(StatsStudySet request)
        {
            var           id    = request?.Id;
            StatsStudySet ret   = null;
            var           query = DocQuery.ActiveQuery ?? Execute;

            DocPermissionFactory.SetSelect <StatsStudySet>(currentUser, "StatsStudySet", request.Select);

            DocEntityStatsStudySet entity = null;

            if (id.HasValue)
            {
                entity = DocEntityStatsStudySet.Get(id.Value);
            }
            if (null == entity)
            {
                throw new HttpError(HttpStatusCode.NotFound, $"No StatsStudySet found for Id {id.Value}");
            }

            if (!DocPermissionFactory.HasPermission(entity, currentUser, DocConstantPermission.VIEW))
            {
                throw new HttpError(HttpStatusCode.Forbidden, "You do not have VIEW permission for this route.");
            }

            ret = entity?.ToDto();
            return(ret);
        }
 public object Get(StatsStudySet request) => GetEntityWithCache <StatsStudySet>(DocConstantModelName.STATSSTUDYSET, request, GetStatsStudySet);