Add filename for LeafInputData details

This commit is contained in:
2020-07-04 21:14:10 -04:00
parent 7ad10d6ddc
commit e4e753c64a
3 changed files with 26 additions and 41 deletions
+5 -1
View File
@@ -27,7 +27,9 @@ namespace LeafWeb.WebCms.App_Start
opt => opt.ResolveUsing(src => src.OutputFiles.Any(o => o.IsLeafChartFile)));
// LeafInputData
Mapper.CreateMap<LeafInputData, LeafInputDataViewModel>();
Mapper.CreateMap<LeafInputData, LeafInputDataViewModel>()
.ForMember(dest => dest.Filename, opt => opt.MapFrom(src => src.LeafOutputFile.Filename));
//.ForMember(dest => dest.Filename, opt => opt.ResolveUsing(src => src.LeafOutputFile.Filename));
// LeafInputDataCurveViewModel
Mapper.CreateMap<LeafInputDataCurve, LeafInputDataCurveViewModel>();
@@ -39,6 +41,8 @@ namespace LeafWeb.WebCms.App_Start
Mapper.CreateMap<LeafInputStatus, LeafInputStatusViewModel>()
.ForMember(dest => dest.Status, opt => opt.MapFrom(li => li.Status.ToString()));
// VERY WEIRD. This next part "fixes" some map configuration issue with LeafInputDataCurve
//AutoMapper.AutoMapperMappingException {"Missing type map configuration or unsupported mapping.
//
//Mapping types: