AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

时间:2023-12-29 22:01:26

异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html

应用场景:ViewModel==>Mode映射的时候出错

AutoMappe r错误信息:Unmapped members were found. Review the types and members below.Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type=====================================================================NoteInfo -> NoteBackModel (Destination member list)PawChina.Models.NoteInfo -> PawChina.Models.BackModels.NoteBackModel (Destination member list)

Unmapped properties:SeoInfo

AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

Model里面比ViewModel多了这个

AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

简单处理:指定属性忽略

AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

扩展:https://github.com/AutoMapper/AutoMapper/wiki/Nested-mappings