public FM70Global MapGlobal(IDataEntity dataEntity) { return(new FM70Global { UKPRN = _dataEntityAttributeService.GetIntAttributeValue(dataEntity, Attributes.UKPRN).Value, RulebaseVersion = _dataEntityAttributeService.GetStringAttributeValue(dataEntity, Attributes.RulebaseVersion), Learners = dataEntity .Children? .Where(c => c.EntityName == Attributes.EntityLearner) .Select(MapLearner) .ToList() }); }
public PeriodisationGlobal MapGlobal(IDataEntity dataEntity) { var learnerPeriodisedValues = dataEntity.Children?.Where(c => c.EntityName == Attributes.EntityLearner).Select(MapLearnerPeriodisedValues).ToList() ?? new List <LearnerPeriodisedValues>(); var learnerPeriods = PivotLearnerPeriodisedValues(learnerPeriodisedValues).ToList(); return(new PeriodisationGlobal() { UKPRN = _dataEntityAttributeService.GetIntAttributeValue(dataEntity, Attributes.UKPRN), RulebaseVersion = _dataEntityAttributeService.GetStringAttributeValue(dataEntity, Attributes.RulebaseVersion), LearnerPeriods = learnerPeriods, LearnerPeriodisedValues = learnerPeriodisedValues }); }
public FM25Global MapGlobal(IDataEntity dataEntity) { return(new FM25Global() { LARSVersion = _dataEntityAttributeService.GetStringAttributeValue(dataEntity, Attributes.LARSVersion), OrgVersion = _dataEntityAttributeService.GetStringAttributeValue(dataEntity, Attributes.OrgVersion), PostcodeDisadvantageVersion = _dataEntityAttributeService.GetStringAttributeValue(dataEntity, Attributes.PostcodeDisadvantageVersion), RulebaseVersion = _dataEntityAttributeService.GetStringAttributeValue(dataEntity, Attributes.RulebaseVersion), UKPRN = _dataEntityAttributeService.GetIntAttributeValue(dataEntity, Attributes.UKPRN), Learners = dataEntity .Children? .Where(c => c.EntityName == Attributes.EntityLearner) .Select(MapLearner) .ToList() }); }