Skip to content

Commit eb7ecad

Browse files
committed
- 修复 Contains 解决可能在 net10 出现的问题;#2144
1 parent 5ef0b27 commit eb7ecad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

FreeSql/Internal/CommonExpression.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,8 +1136,10 @@ public string ExpressionLambdaToSql(Expression exp, ExpTSC tsc)
11361136
return conditionalSql;
11371137
}
11381138
case ExpressionType.Call:
1139-
if (!tsc.isNotSetMapColumnTmp) tsc.mapType = null;
11401139
var exp3 = exp as MethodCallExpression;
1140+
if (exp3.Type.Name == "ReadOnlySpan`1" && exp3.Method.Name == "op_Implicit" && exp3.Arguments.Count == 1)
1141+
return ExpressionLambdaToSql(exp3.Arguments[0], tsc);
1142+
if (!tsc.isNotSetMapColumnTmp) tsc.mapType = null;
11411143
if (exp3.IsExpressionCall())
11421144
{
11431145
//SqlExt.In 替换成 Array.Contains 解析,可避免 MapType 问题

0 commit comments

Comments
 (0)