Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AutoMapper throws an error - how to figure out?
Message
De
12/05/2016 09:55:44
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Produits tierce partie
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01636216
Message ID:
01636220
Vues:
109
This message has been marked as a message which has helped to the initial question of the thread.
>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.

Have you tried AssertConfigurationIsValid() ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform