diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/ExpressionTool.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/ExpressionTool.cs index 9a8d20c44..d87bd70f9 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/ExpressionTool.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/ExpressionTool.cs @@ -19,7 +19,8 @@ namespace SqlSugar { if (method.Method.Name == "ToList") { - if (method.Arguments.FirstOrDefault() is { } arg) + var arg = method.Arguments.FirstOrDefault(); + if (arg!=null) { if (arg is MemberExpression member) {