We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MapToList fails when coming accross enum properties.
MapToList
Could handle them something like:
var val = dr.GetValue(colMapping[prop.Name.ToLower()].ColumnOrdinal.Value); if(prop.PropertyType.IsEnum) { prop.SetValue(obj, val == DBNull.Value ? null : Enum.ToObject(prop.PropertyType, (int)val)); } else { prop.SetValue(obj, val == DBNull.Value ? null : val); }
The above isn't really finished, as it doesn't handle null correcty,- i.e should map DbNull only to nullable enums.
nullable
The text was updated successfully, but these errors were encountered:
No branches or pull requests
MapToList
fails when coming accross enum properties.Could handle them something like:
The above isn't really finished, as it doesn't handle null correcty,- i.e should map DbNull only to
nullable
enums.The text was updated successfully, but these errors were encountered: