Update enum

This commit is contained in:
sunkaixuna
2021-12-29 21:25:58 +08:00
parent d9382a1fd9
commit 68c5f60d3e

View File

@@ -60,7 +60,14 @@ namespace SqlSugar
} }
else if (type.IsEnum()) else if (type.IsEnum())
{ {
return Convert.ToInt64(value); if (this.Context.CurrentConnectionConfig.MoreSettings?.TableEnumIsString == true)
{
return value.ToSqlValue();
}
else
{
return Convert.ToInt64(value);
}
} }
else if (type == UtilConstants.ByteArrayType) else if (type == UtilConstants.ByteArrayType)
{ {