Exemple #1
0
 private Dictionary <Guid, FootnotesFilterMetaViewModel> GetFilters(Guid subjectId)
 {
     return(_filterRepository.GetFiltersIncludingItems(subjectId)
            .ToDictionary(
                filter => filter.Id,
                filter => new FootnotesFilterMetaViewModel
     {
         Hint = filter.Hint,
         Legend = filter.Label,
         Options = filter.FilterGroups
                   .OrderBy(items => items.Label, LabelComparer)
                   .ToDictionary(
             filterGroup => filterGroup.Id,
             filterGroup => BuildFilterItemsMetaViewModel(filterGroup, filterGroup.FilterItems))
     }));
 }
 private Dictionary <string, FilterMetaViewModel> GetFilters(Guid subjectId)
 {
     return(_filterRepository.GetFiltersIncludingItems(subjectId)
            .ToDictionary(
                filter => filter.Label.PascalCase(),
                filter => new FilterMetaViewModel
     {
         Hint = filter.Hint,
         Legend = filter.Label,
         Options = filter.FilterGroups
                   .OrderBy(filterGroup => filterGroup.Label, LabelComparer)
                   .ToDictionary(
             filterGroup => filterGroup.Label.PascalCase(),
             filterGroup => BuildFilterItemsViewModel(filterGroup, filterGroup.FilterItems)),
         TotalValue = GetTotalValue(filter)
     }));
 }