From a703173ac27fce20739940abb062b6021c9bc5b7 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 12 May 2023 12:27:06 +0800 Subject: [PATCH] Synchronization code --- .../SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs index 10053c5a6..6ebf153c6 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs @@ -572,6 +572,10 @@ namespace SqlSugar } public IUpdateable SetColumns(Expression> filedNameExpression, Expression> valueExpression) { + if (valueExpression == null) + { + return SetColumns(filedNameExpression,(object)null); + } var name = UpdateBuilder.GetExpressionValue(filedNameExpression, ResolveExpressType.FieldSingle).GetString(); name = UpdateBuilder.Builder.GetNoTranslationColumnName(name); var value = UpdateBuilder.GetExpressionValue(valueExpression, ResolveExpressType.FieldSingle).GetString();