public async Task <IDictionary <int, RoleMicroSummary> > ExecuteAsync(GetRoleMicroSummariesByIdRangeQuery query, IExecutionContext executionContext) { if (EnumerableHelper.IsNullOrEmpty(query.RoleIds)) { return(new Dictionary <int, RoleMicroSummary>()); } var roleDetails = await _internalRoleRepository.GetByIdRangeAsync(query.RoleIds); var result = roleDetails .Select(d => _roleMicroSummaryMapper.Map(d.Value)) .ToDictionary(k => k.RoleId); return(result); }
public IDomainRepositoryQueryContext <IDictionary <int, RoleMicroSummary> > AsMicroSummaries() { var query = new GetRoleMicroSummariesByIdRangeQuery(_roleIds); return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository)); }
public IEnumerable <IPermissionApplication> GetPermissions(GetRoleMicroSummariesByIdRangeQuery command) { yield return(new RoleReadPermission()); }