Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error in AutoMapper
Message
De
19/08/2014 05:11:30
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Programmation orienté objet
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01605838
Message ID:
01606050
Vues:
52
>>Hmm. Well somewhere AutoMapper is finding a ItemType.ItemType.
>>Looks like ItemType property can be found in .NET in :
>>
>>Strongly typed data
>>ListViewItem
>>DataListItem
>>DataGridItem
>>
>>and maybe more.
>>Can you work out which applies in this case ?
>>If you can't find anything that maybe there's a bug in AutoMapper - perhaps post a question on their mailing list....
>
>I think it's a bug in AutoMapper, I'll try contacting the author. Right now I am getting yet another error, but this time it is absolutely not helpful
>
>
>AutoMapper.AutoMapperMappingException was unhandled by user code
>  HResult=-2146233088
>  Message=Value supplied is of type System.Boolean but expected System.Byte.
>Change the value resolver source type, or redirect the source value supplied to the value resolver using FromMember.
>Value supplied is of type System.Boolean but expected System.Byte.
>Change the value resolver source type, or redirect the source value supplied to the value resolver using FromMember.
>
>So, how would I know which column generated this error. I'm getting the error on this line
>
>
>   ItemViewModel itemViewModel = AutoMapper.Mapper.Map<Items, ItemViewModel>(item);
>
>and both classes have lots of properties :(

How many properties in the destination class of type Byte - those are the possible culprits.

Will AssertConfigurationIsValid() give better detail ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform