Example #1
0
        private IQueryable <RootEntityMicroSummary> Query(GetImageAssetEntityMicroSummariesByIdRangeQuery query)
        {
            var definition = _entityDefinitionRepository.GetByCode(ImageAssetEntityDefinition.DefinitionCode);

            var dbQuery = _dbContext
                          .ImageAssets
                          .AsNoTracking()
                          .FilterByIds(query.ImageAssetIds)
                          .Select(v => new RootEntityMicroSummary()
            {
                RootEntityId         = v.ImageAssetId,
                RootEntityTitle      = v.FileName,
                EntityDefinitionCode = definition.EntityDefinitionCode,
                EntityDefinitionName = definition.Name
            });

            return(dbQuery);
        }
Example #2
0
 public IEnumerable <IPermissionApplication> GetPermissions(GetImageAssetEntityMicroSummariesByIdRangeQuery query)
 {
     yield return(new ImageAssetReadPermission());
 }
Example #3
0
        public async Task <IDictionary <int, RootEntityMicroSummary> > ExecuteAsync(GetImageAssetEntityMicroSummariesByIdRangeQuery query, IExecutionContext executionContext)
        {
            var results = await Query(query).ToDictionaryAsync(e => e.RootEntityId);

            return(results);
        }
Example #4
0
        public IDictionary <int, RootEntityMicroSummary> Execute(GetImageAssetEntityMicroSummariesByIdRangeQuery query, IExecutionContext executionContext)
        {
            var results = Query(query).ToDictionary(e => e.RootEntityId);

            return(results);
        }