Ejemplo n.º 1
0
 public TableBuilderCharacteristicData BuildResult(ICharacteristicData data, ICollection <string> attributeFilter)
 {
     return(new TableBuilderCharacteristicData
     {
         Year = data.Year,
         SchoolType = data.SchoolType,
         // TODO Label is not currently set in CharacteristicViewModel. Not sure if it needs to be?
         // TODO If Label is not used then is CharacteristicViewModel needed?
         Characteristic = _mapper.Map <CharacteristicViewModel>(data.Characteristic),
         Attributes = attributeFilter.Count > 0
             ? QueryUtil.FilterAttributes(data.Attributes, attributeFilter)
             : data.Attributes
     });
 }
 public TableBuilderGeographicData BuildResult(IGeographicData data, ICollection <string> attributeFilter)
 {
     return(new TableBuilderGeographicData
     {
         Year = data.Year,
         SchoolType = data.SchoolType,
         Country = data.Country,
         Region = data.Region,
         LocalAuthority = data.LocalAuthority,
         School = data.School,
         Attributes = attributeFilter.Count > 0
             ? QueryUtil.FilterAttributes(data.Attributes, attributeFilter)
             : data.Attributes
     });
 }