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

简介:

异常处理汇总-后端系列 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

Model里面比ViewModel多了这个

简单处理:指定属性忽略

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

 


本文转自毒逆天博客园博客,原文链接:http://www.cnblogs.com/dunitian/p/5606222.html,如需转载请自行联系原作者


相关文章
|
11月前
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
261 0
|
5月前
|
数据库
Field ‘xxx‘ doesn‘t have a default value
Field ‘xxx‘ doesn‘t have a default value
36 0
Unknown custom element: <add-employee> - did you register the component correctly? For red cursive c
原因: 1.组件名没写对(导入和注册不对应) 2.components少写了个s 3.组件命名最好是驼峰命名 4.导入时语法错误 5.代码中有两个components,后一个的值把前一个覆盖了 6.组件直接循环套用了
使用pageHelper报错 Type definition error: [simple type, classXXXX]
使用pageHelper报错 Type definition error: [simple type, classXXXX]
|
Linux
ERROR: 2 matches found based on name: network product-server_default is ambiguous
ERROR: 2 matches found based on name: network product-server_default is ambiguous
146 0
|
Java
The type XXX cannot be resolved. It is indirectly referenced from required .class files
The type XXX cannot be resolved. It is indirectly referenced from required .class files
117 0
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
304 0
No injector for custom defined data type的解决办法
No injector for custom defined data type的解决办法
245 0
No injector for custom defined data type的解决办法
custom field further usage - add into UI and report
custom field further usage - add into UI and report
139 0
custom field further usage - add into UI and report