Automapper ForPath映射和未映射的属性异常

时间:2018-07-31 08:36:32

标签: c# automapper

我正在尝试映射(通过MemberList.Source验证)源属性中的嵌套成员,例如

 .ForPath(target => target.NestedObj.IpAddress, opt=>opt.MapFrom(source => source.IpAddress))

但是在验证g配置时会抛出

AutoMapper.AutoMapperConfigurationException: 
Unmapped members were found. Review the types and members below.

我知道我可以忽略这个提议,但我想尽可能避免它。

0 个答案:

没有答案