SlapperAutoMapper / Slapper.AutoMapper

Slapper.AutoMapper maps dynamic data to static types. Slap your data into submission!
MIT License
287 stars 76 forks source link

Mapping nullable Guids fails #56

Closed FilipFilipov closed 3 years ago

FilipFilipov commented 7 years ago

If you call MapDynamic for a value where a string should be converted to a Guid?, you get a System.Exception : Invalid cast from 'System.String' to 'System.Guid'. I looked through the code and the GuidConverter's CanConvert method indeed does not check for nullable Guids.

FilipFilipov commented 7 years ago

Also in ConvertValuesTypeToMembersType you should probably check if the member type is nullable with the same underlying type as the valu, so you don't try to convert a Guid to a Guid? for example.

randyburden commented 3 years ago

The fix for this has been released in v2.0.2 and pushed to NuGet