private IQueryable <ChildEntityMicroSummary> Query(GetPageVersionModuleEntityMicroSummariesByIdRangeQuery query)
        {
            var definition = _entityDefinitionRepository.GetByCode(PageEntityDefinition.DefinitionCode);

            var dbQuery = _dbContext
                          .PageVersionModules
                          .AsNoTracking()
                          .Where(m => query.PageVersionModuleIds.Contains(m.PageVersionModuleId))
                          .Select(m => new ChildEntityMicroSummary()
            {
                ChildEntityId        = m.PageVersionModuleId,
                RootEntityId         = m.PageVersion.PageId,
                RootEntityTitle      = m.PageVersion.Title,
                EntityDefinitionCode = definition.EntityDefinitionCode,
                EntityDefinitionName = definition.Name,
                IsPreviousVersion    = m.PageVersion.WorkFlowStatusId != (int)WorkFlowStatus.Published || m.PageVersion.WorkFlowStatusId != (int)WorkFlowStatus.Draft
            });

            return(dbQuery);
        }
 public IEnumerable <IPermissionApplication> GetPermissions(GetPageVersionModuleEntityMicroSummariesByIdRangeQuery query)
 {
     yield return(new PageReadPermission());
 }
        public IDictionary <int, RootEntityMicroSummary> Execute(GetPageVersionModuleEntityMicroSummariesByIdRangeQuery query, IExecutionContext executionContext)
        {
            var results = Query(query).ToDictionary(e => e.ChildEntityId, e => (RootEntityMicroSummary)e);

            return(results);
        }