Update enum

This commit is contained in:
sunkaixuan 2023-04-03 12:50:11 +08:00
parent 961b4755e6
commit ff704514f1

View File

@ -45,11 +45,18 @@ namespace SqlSugar
}
}
private static object Select(ExpressionParameter parameter, object value)
private object Select(ExpressionParameter parameter, object value)
{
if (value != null && value.GetType().IsEnum())
{
value = Convert.ToInt64(value);
if (this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.TableEnumIsString == true)
{
value = Convert.ToString(value);
}
else
{
value = Convert.ToInt64(value);
}
}
parameter.BaseParameter.CommonTempData = value;
return value;