示例#1
0
        public Task <ICollection <UserAreaMicroSummary> > ExecuteAsync(GetAllUserAreaMicroSummariesQuery query, IExecutionContext executionContext)
        {
            var areas   = _userAreaRepository.GetAll().OrderBy(u => u.Name);
            var results = areas
                          .Select(a => new UserAreaMicroSummary()
            {
                Name         = a.Name,
                UserAreaCode = a.UserAreaCode
            })
                          .ToList();

            return(Task.FromResult <ICollection <UserAreaMicroSummary> >(results));
        }
示例#2
0
        public IDomainRepositoryQueryContext <ICollection <UserAreaMicroSummary> > AsMicroSummaries()
        {
            var query = new GetAllUserAreaMicroSummariesQuery();

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