@mikependon did a lot of comparative work on enum coercion across ADO.NET providers (thanks @mikependon!) - the results can be seen here: https://twitter.com/mike_pendon/status/1325442299862659074.
Bottom line:
- When DbType.String or DbType.Integer are set, enums are properly coerced by all providers except Npgsql
- When DbType isn't set, some inconsistent behavior occurs, e.g. the int value would be textually saved in text columns in some cases.
I don't think we should support this without DbType (especially in light of the weird/problematic behavior across providers), but we should consider aligning with others and at least allowing DbType.String/Integer.
@mikependon did a lot of comparative work on enum coercion across ADO.NET providers (thanks @mikependon!) - the results can be seen here: https://twitter.com/mike_pendon/status/1325442299862659074.
Bottom line:
I don't think we should support this without DbType (especially in light of the weird/problematic behavior across providers), but we should consider aligning with others and at least allowing DbType.String/Integer.