public IEnumerable <IPermissionApplication> GetPermissions(GetCustomEntityDataModelSchemaDetailsByDefinitionCodeRangeQuery query)
 {
     foreach (var code in query.CustomEntityDefinitionCodes)
     {
         var definition = _customEntityDefinitionRepository.GetByCode(code);
         yield return(new CustomEntityReadPermission(definition));
     }
 }
        public Task <IDictionary <string, CustomEntityDataModelSchema> > AsDetailsAsync()
        {
            var query = new GetCustomEntityDataModelSchemaDetailsByDefinitionCodeRangeQuery(_customEntityDefinitionCodes);

            return(ExtendableContentRepository.ExecuteQueryAsync(query));
        }
        public async Task <IDictionary <string, CustomEntityDataModelSchema> > ExecuteAsync(GetCustomEntityDataModelSchemaDetailsByDefinitionCodeRangeQuery query, IExecutionContext executionContext)
        {
            var definitionQuery = new GetAllCustomEntityDefinitionSummariesQuery();
            var definitions     = await _queryExecutor.ExecuteAsync(definitionQuery, executionContext);

            var results = new Dictionary <string, CustomEntityDataModelSchema>();

            foreach (var definition in definitions
                     .Where(d => query.CustomEntityDefinitionCodes.Contains(d.CustomEntityDefinitionCode)))
            {
                var result = new CustomEntityDataModelSchema();
                result.CustomEntityDefinitionCode = definition.CustomEntityDefinitionCode;
                _dynamicDataModelTypeMapper.Map(result, definition.DataModelType);

                results.Add(definition.CustomEntityDefinitionCode, result);
            }

            return(results);
        }
        public IContentRepositoryQueryContext <IDictionary <string, CustomEntityDataModelSchema> > AsDetails()
        {
            var query = new GetCustomEntityDataModelSchemaDetailsByDefinitionCodeRangeQuery(_customEntityDefinitionCodes);

            return(ContentRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }