mgravell / fast-member

Automatically exported from code.google.com/p/fast-member
Apache License 2.0
1.02k stars 137 forks source link

Access to nullable Enum throw an exception #80

Closed sbalia closed 2 years ago

sbalia commented 4 years ago

When I want to convert from DbDataReader to my class which contains Enum? property, I have got next exception: InvalidCastException 'Specified cast is not valid'. To access to my properties I use TypeAccessor class. This exception occurs in TypeAccessoor.cs at 280 line.

mgravell commented 4 years ago

Do you have a minimal but runnable repro I can look at, including enough of your type to make this work? Also, this sounds like a job for Dapper to be honest - it loves data readers.

sbalia commented 3 years ago

@mgravell hi, I know that I'm late to the party with my minimal but runnable repo, but you can look at it now, including enough information about types to reproduce just in sec the issue I described above. https://github.com/StasBalia/SampleFastMember

MarcinJaskulski commented 2 years ago

@sbalia, did you find the solution?