Nullable Enum Property

Issue #135 new
Daniel John Causer created an issue

Hey guys, I'm trying to use this lib in my project, but one entity that I'm trying to retrieve from the DB has a Nullable Enum property.

TO make NewtonsoftJson understand it I had to decorate the property with a StringEnumConverter class that would handle the convertion for me.

I'm wondering if there is such a thing for Sqlite-Net Extensions Here is my stack trace, it is failing to handle the null value to integer:

EXCEPTION: System.ArgumentException: Object of type 'System.Int32' cannot be converted to type 'System.Nullable`1[FarmPro.Services.Core.Constants.AmountType]'. at System.RuntimeType.CheckValue (System.Object value, System.Reflection.Binder binder, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) [0x00056] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/corlib/ReferenceSources/RuntimeType.cs:195

Comments (1)

  1. Log in to comment