private async Task <IEnumerable <LocalisationDto> > GetLocalisationsAsync(IAuditedDocumentDbService auditedDocumentDbService) { var localisationTextList = await auditedDocumentDbService.GetDocumentsAsync <LocalisationText, LocalisationDto> (q => q.Where(l => l.IncludeInPod).Select(l => new LocalisationDto { Culture = l.Culture, Key = l.Key, Section = l.Section, Value = l.Value })); return(localisationTextList); }
private async Task <IEnumerable <LookupDto> > GetLookupsAsync(IAuditedDocumentDbService auditedDocumentDbService) { var lookups = await auditedDocumentDbService.GetDocumentsAsync <Lookup, Lookup> (q => q.Where(l => l.IncludeInPod)); var dtoList = lookups.Select(l => new LookupDto() { Culture = l.Culture, Key = l.Key, Section = l.Section, Values = l.Items?.Select(i => new LookupValueDto { ChildLookupKey = i.ChildLookupKey, SortOrder = i.SortOrder, Text = i.Text, Value = i.Value }) ?? new List <LookupValueDto>() }); return(dtoList); }