Enum with underlying type long
alec-anikin opened this issue · comments
Alec Anikin commented
NpgsqlBulkCodeBuilder line 158
else if (mi.ReturnType.GetTypeInfo().IsEnum)
{
ilOut.Emit(OpCodes.Ldc_I4_S, (int)info.NpgsqlType);
ilOut.Emit(OpCodes.Call, writeMethodFull.MakeGenericMethod(typeof(Int32)));
}
There should be check for enum:long.
Thanks for useful library!
msvprogs commented
Not only long but all possible integer types should be supported. Just pass Enum.GetUnderlyingType() instead of hardcoded Int32.
Anton Shkuratov commented
Hi @alec-anikin, @msvprogs, thanks for usefull suggestion. I've implemented this in 0.6.9 release. Please check.