Skip to content

Commit bd423fa

Browse files
committed
Better handling for enums.
1 parent 7f361b9 commit bd423fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Common/TypeHelper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,11 @@ public static Type GetTypeFromDbDataType(DbDataType type)
395395

396396
public static FbDbType GetFbDataTypeFromType(Type type)
397397
{
398+
if (type.IsEnum)
399+
{
400+
return GetFbDataTypeFromType(Enum.GetUnderlyingType(type));
401+
}
402+
398403
if (type == typeof(System.String) || type == typeof(System.DBNull))
399404
{
400405
return FbDbType.VarChar;

0 commit comments

Comments
 (0)