private IQueryable <RootEntityMicroSummary> Query(GetWebDirectoryEntityMicroSummariesByIdRangeQuery query)
        {
            var definition = _entityDefinitionRepository.GetByCode(WebDirectoryEntityDefinition.DefinitionCode);

            var dbQuery = _dbContext
                          .WebDirectories
                          .AsNoTracking()
                          .Where(d => query.WebDirectoryIds.Contains(d.WebDirectoryId))
                          .Select(d => new RootEntityMicroSummary()
            {
                RootEntityId         = d.WebDirectoryId,
                RootEntityTitle      = d.Name,
                EntityDefinitionName = definition.Name,
                EntityDefinitionCode = definition.EntityDefinitionCode
            });

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

            return(results);
        }
        public async Task <IDictionary <int, RootEntityMicroSummary> > ExecuteAsync(GetWebDirectoryEntityMicroSummariesByIdRangeQuery query, IExecutionContext executionContext)
        {
            var results = await Query(query).ToDictionaryAsync(e => e.RootEntityId);

            return(results);
        }