protected override void DoStart()
      {
         _allDiseaseSates.AddRange(_flatDiseaseStateRepository.All().MapAllUsing(_diseaseStateMapper));

         foreach (var query in _flatPopulationDiseaseStateRepository.All().GroupBy(x => x.Population))
         {
            var population = _populationRepository.FindByName(query.Key);
            var diseaseStates = new List<DiseaseState>();
            diseaseStates.AddRange(query.Select(x => _allDiseaseSates[x.DiseaseState]));
            _allDiseaseStatePerPopulation[population] = diseaseStates;
         }

         _healthyState = _allDiseaseSates.FindByName(CoreConstants.DiseaseStates.HEALTHY);
      }
Beispiel #2
0
 public override object ConvertFrom(string attributeValue, SerializationContext context)
 {
     return(_populationRepository.FindByName(attributeValue));
 }