diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs index 90e941505..8967f1c5e 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs @@ -54,6 +54,8 @@ namespace SqlSugar if (this.Context.JoinIndex > 0) { this.Context.Parameters.AddRange(copyContext.Parameters); + this.Context.Index = copyContext.Index; + this.Context.ParameterIndex = copyContext.ParameterIndex; } var regex = @"^AND (\@Const\d+) $"; diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs index 85b6a201d..4d43ebab0 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs @@ -56,6 +56,8 @@ namespace SqlSugar if (this.Context.JoinIndex > 0) { this.Context.Parameters.AddRange(copyContext.Parameters); + this.Context.Index = copyContext.Index; + this.Context.ParameterIndex = copyContext.ParameterIndex; } var regex = @"^WHERE (\@Const\d+) $"; diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs index 90e941505..8967f1c5e 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs @@ -54,6 +54,8 @@ namespace SqlSugar if (this.Context.JoinIndex > 0) { this.Context.Parameters.AddRange(copyContext.Parameters); + this.Context.Index = copyContext.Index; + this.Context.ParameterIndex = copyContext.ParameterIndex; } var regex = @"^AND (\@Const\d+) $"; diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs index 85b6a201d..4d43ebab0 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs @@ -56,6 +56,8 @@ namespace SqlSugar if (this.Context.JoinIndex > 0) { this.Context.Parameters.AddRange(copyContext.Parameters); + this.Context.Index = copyContext.Index; + this.Context.ParameterIndex = copyContext.ParameterIndex; } var regex = @"^WHERE (\@Const\d+) $";