From 0ce74d5a4a01036d1cbcc864954b35681c0f7fec Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 28 Apr 2025 21:46:41 +0800 Subject: [PATCH] Update exp to sql --- .../SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs index 0bd98f9b1..a9c49626c 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs @@ -74,14 +74,14 @@ namespace SqlSugar } if (model.Parameters != null && model.Conext!=null - && ifTrue.startsWith(model.Conext?.SqlParameterKeyWord) - && ifFalse.startsWith(model.Conext?.SqlParameterKeyWord)) + && ifTrue.StartsWith(model.Conext?.SqlParameterKeyWord) + && ifFalse.StartsWith(model.Conext?.SqlParameterKeyWord)) { var p2= model.Parameters.Where(it=>it.ParameterName!=null).FirstOrDefault(it => it.ParameterName.Equals(ifTrue)); var p3 = model.Parameters.Where(it => it.ParameterName != null).FirstOrDefault(it => it.ParameterName.Equals(ifFalse)); if (p2 != null && p3 != null) { - if (p2.Value?.equals(p3.Value) == true) + if (p2.Value?.Equals(p3.Value) == true) { model.Parameters.Remove(p3); return $" {parameter2.MemberName} ";