From f81434b5fac1cbfbaea937955ae7b8a6ebb38872 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 23 Nov 2022 11:35:36 +0800 Subject: [PATCH] Update exp to sql --- Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs | 2 ++ .../SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs | 2 ++ .../SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs | 2 ++ .../SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs | 2 ++ 4 files changed, 8 insertions(+) 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+) $";