private IQueryable <RootEntityMicroSummary> Query(GetDocumentAssetEntityMicroSummariesByIdRangeQuery query) { var definition = _entityDefinitionRepository.GetByCode(DocumentAssetEntityDefinition.DefinitionCode); var dbQuery = _dbContext .DocumentAssets .AsNoTracking() .FilterByIds(query.DocumentAssetIds) .Select(a => new RootEntityMicroSummary() { RootEntityId = a.DocumentAssetId, RootEntityTitle = a.Title, EntityDefinitionCode = definition.EntityDefinitionCode, EntityDefinitionName = definition.Name }); return(dbQuery); }
public IEnumerable <IPermissionApplication> GetPermissions(GetDocumentAssetEntityMicroSummariesByIdRangeQuery query) { yield return(new DocumentAssetReadPermission()); }
public IDictionary <int, RootEntityMicroSummary> Execute(GetDocumentAssetEntityMicroSummariesByIdRangeQuery query, IExecutionContext executionContext) { var results = Query(query).ToDictionary(e => e.RootEntityId); return(results); }
public async Task <IDictionary <int, RootEntityMicroSummary> > ExecuteAsync(GetDocumentAssetEntityMicroSummariesByIdRangeQuery query, IExecutionContext executionContext) { var results = await Query(query).ToDictionaryAsync(e => e.RootEntityId); return(results); }