We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f439ec commit dfbd0a3Copy full SHA for dfbd0a3
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubToList.cs
@@ -178,6 +178,11 @@ private string GetValueByAuto(MethodCallExpression exp)
178
var select = copyContext.Result.GetString();
179
if (dic.Count > 0 && appendColumns.Count == 0)
180
{
181
+ if (copyContext.Parameters?.Any()==true)
182
+ {
183
+ this.Context.Parameters.AddRange(copyContext.Parameters);
184
+ select = select.Replace("), AS", ") AS");
185
+ }
186
return select + ",@sugarIndex as sugarIndex"; ;
187
}
188
else if (dic.Count > 0 && appendColumns.Count > 0)
0 commit comments