Search for both LeafInput and LeafInputData

This commit is contained in:
2023-02-02 09:35:22 -05:00
parent 8e16510ad9
commit 680f139aa5
24 changed files with 808 additions and 281 deletions
@@ -18,9 +18,40 @@ namespace LeafWeb.WebCms.Models
public double? PhiPS2 { get; set; }
public LeafInputDataCurveViewModel() {}
static LeafInputDataCurveViewModel()
{
Mapper.CreateMap<LeafInputData, LeafInputDataCurveViewModel>()
.ForMember(m => m.CO2S,
conf =>
conf.MapFrom(d =>
LeafInputData.Range(d.Data, c => c.CO2S)))
.ForMember(m => m.PARi,
conf =>
conf.MapFrom(d =>
LeafInputData.Range(d.Data, c => c.PARi)))
.ForMember(m => m.Tleaf,
conf =>
conf.MapFrom(d =>
LeafInputData.Range(d.Data, c => c.Tleaf)))
.ForMember(m => m.PhiPS2,
conf =>
conf.MapFrom(d =>
LeafInputData.Range(d.Data, c => c.PhiPS2)))
;
}
public LeafInputDataCurveViewModel(LeafInputDataCurve leafInputDataCurve)
{
Mapper.Map(leafInputDataCurve, this);
}
public LeafInputDataCurveViewModel(LeafInputData leafInputData)
{
Mapper.Map(leafInputData, this);
//CO2S = LeafInputData.Range(dataCurves, c => c.CO2S);
//PARi = LeafInputData.Range(dataCurves, c => c.PARi);
//Tleaf = LeafInputData.Range(dataCurves, c => c.Tleaf);
//PhiPS2 = LeafInputData.Range(dataCurves, c => c.PhiPS2);
}
}
}