From 0e0667f1c059c0c537b8d6413587291c4867f0e5 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 4 Sep 2023 20:41:43 +0800 Subject: [PATCH] Synchronization code --- .../SqlSugar/Infrastructure/ContextMethods.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs b/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs index b1a7273d5..816f2b7da 100644 --- a/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs +++ b/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs @@ -852,7 +852,14 @@ namespace SqlSugar var row = result.NewRow(); foreach (var key in item.Keys) { - row[key] = item[key]; + if (item[key] == null) + { + row[key] = DBNull.Value; + } + else + { + row[key] = item[key]; + } } result.Rows.Add(row);