Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AutoMapper throws an error - how to figure out?
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Third party products
Title:
AutoMapper throws an error - how to figure out?
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01636216
Message ID:
01636216
Views:
57
Hi everybody,

We got that form working fine last time I tested (it was a while ago). Yesterday I tried to test it again (and I upgraded to the latest AutoMapper and prior to that my colleague also upgraded about a month or 2 ago) and I'm getting this error now:
AutoMapper.AutoMapperMappingException was unhandled by user code
  HResult=-2146233088
  Message=Missing type map configuration or unsupported mapping.

Mapping types:
GstPass -> EditPassViewModel
Siriusware.Models.GstPass -> SysManager.Web.Areas.Guests.Models.EditPassViewModel

Destination path:
EditPassViewModel

Source value:
Siriusware.Models.GstPass
Both classes (GstPass and EditPassViewModel) are quite complex. I have the following in the AutoMapper.config
  CreateMap<GstPass, EditPassViewModel>()
                //.ForMember(dest => dest.LastUse,
                //    opt => opt.ResolveUsing<TrimStringResolver>().FromMember(source => source.LastUse.Value.ToString()))
             .ForMember(dest => dest.InHouseCardBalanceAndLimits, option => option.Ignore())
             .ForMember(dest => dest.InHouseCardTransactions, option => option.Ignore())
             .ForMember(dest => dest.BlReason,
                    opt => opt.ResolveUsing<TrimStringResolver>().FromMember(source => source.BlReason.ToString()));
I'm wondering what can I do to figure out why I'm getting this error which is new as that form used to work before.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform