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)); }
public IDomainRepositoryQueryContext <ICollection <UserAreaMicroSummary> > AsMicroSummaries() { var query = new GetAllUserAreaMicroSummariesQuery(); return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository)); }