From d8f2c7346493e6cd550e33bd4a0a5fe19bc7c429 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 7 Dec 2023 22:39:27 +0800 Subject: [PATCH] Synchronization code --- .../SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs index dcdce1796..19f6221d2 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs @@ -608,7 +608,7 @@ namespace SqlSugar var str = "concat('" + model.Args[0].MemberValue.ObjToString() + "')"; str = Regex.Replace(str, @"(\{\d+?\})", "',$1,'"); - var array = model.Args.Skip(1).Select(it => it.IsMember ? it.MemberName : it.MemberValue) + var array = model.Args.Skip(1).Select(it => it.IsMember ? it.MemberName : (it.MemberValue == null ? "''" : it.MemberValue.ToSqlValue())) .Select(it => ToString(new MethodCallExpressionModel() { Args = new List() {