mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-05 21:27:58 +08:00
Update enum
This commit is contained in:
parent
961b4755e6
commit
ff704514f1
@ -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())
|
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;
|
parameter.BaseParameter.CommonTempData = value;
|
||||||
return value;
|
return value;
|
||||||
|
Loading…
Reference in New Issue
Block a user