Esempio n. 1
0
 private TagValue GetTagValue(Article input)
 {
     return(new TagValue()
     {
         Value = input.FieldValues.Single(m => m.Field.Name == TagValueName).Value,
         RegionsId = input.FieldValues.Single(m => m.Field.RelateToContentId == RegionsContentId)
                     .RelatedItems
     });
 }
Esempio n. 2
0
 private TagValue[] GetTagValues(Article t, Dictionary <int, List <int> > tagValuesRelations, Dictionary <int, Article> tagValues)
 {
     return(tagValuesRelations.TryGetValue(t.Id, out var tagValueRelation)
         ? tagValueRelation.Select(n => tagValues[n]).Select(GetTagValue).OrderBy(n => n.RegionsId.FirstOrDefault()).ToArray()
         : new TagValue[] { });
 }