天天看點

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

異常處理彙總-後端系列 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

作者:毒逆天

出處:https://www.cnblogs.com/dotnetcrazy

打賞:<b>18i4JpL6g54yAPAefdtgqwRrZ43YJwAV5z</b>

本文版權歸作者和部落格園共有。歡迎轉載,但必須保留此段聲明,且在文章頁面明顯位置給出原文連接配接!

繼續閱讀