AutoMapper 4.2.1更改为现在为未映射的属性提供错误

时间:2016-07-22 21:16:32

标签: c# automapper

these directions具有相同的问题。

升级到AutoMapper 4.2.1后,调用时未突然显示未映射属性的错误:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> AutoMapper.AutoMapperConfigurationException: 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 ========================================================================================== NopCommerceOrderHeader -> OrderHeader (Destination member list) NopCommerceAdapter.Domain.NopCommerceOrderHeader -> OTIS.Domain.InventoryMgmt.OrderHeader (Destination member list) Unmapped properties: Id FacilityId CustomerId StatusId RushOrderFlag CashDiscountFlag PayViaCODFlag InvoicesLateFlag OrderedByUserId ProjectName CustomerPONbr CustomerRequestedDateTime Notes CreatedById CreatedOn ModifiedById ModifiedOn FixedCustomerPrice WebOrderPaymentStatusId AssignedToUserId FinancialsId OrderType WorkReleaseHeaderId StoreFrontId CustomerContact Customer Facility OrderHeaderStatus UserProfile UserProfile1 PODetails TimeDetails OrderNotifications UserProfile2 ShippingContainerHeaders WorkReleaseHeader InvoiceHeaders CreatedByName ModifiedByName

对于他们中的大多数人,我只是在每个属性上明确设置.ignore(),但后来我来到这个,它有很多属性,它让我思考,这违反了整个使用AutoMapper的原因。

我错过了什么吗?

var ws = new WebSocket('wss://hostname')

0 个答案:

没有答案