Browse Source

Synchronization code

pull/26/MERGE
sunkaixuan 2 years ago
parent
commit
eafcd87c75
  1. 8
      Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs
  2. 5
      Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs

8
Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubAnd.cs

@ -42,13 +42,19 @@ namespace SqlSugar
var exp = expression as MethodCallExpression;
var argExp = exp.Arguments[0];
var copyContext = this.Context;
if (this.Context.JoinIndex > 0)
{
copyContext = this.Context.GetCopyContextWithMapping();
copyContext.IsSingle = false;
}
var result = "AND " + SubTools.GetMethodValue(copyContext, argExp, ResolveExpressType.WhereMultiple);
var result = "AND " + SubTools.GetMethodValue(copyContext, argExp, ResolveExpressType.WhereMultiple);
if (this.Context.JoinIndex > 0)
{
this.Context.Parameters.AddRange(copyContext.Parameters);
}
var regex = @"^AND (\@Const\d+) $";
if (this.Context is OracleExpressionContext)

5
Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubWhere.cs

@ -53,7 +53,10 @@ namespace SqlSugar
}
var result = "WHERE " + SubTools.GetMethodValue(copyContext, argExp, ResolveExpressType.WhereMultiple);
if (this.Context.JoinIndex > 0)
{
this.Context.Parameters.AddRange(copyContext.Parameters);
}
var regex = @"^WHERE (\@Const\d+) $";
if (this.Context is OracleExpressionContext)

Loading…
Cancel
Save