diff --git a/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs b/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs index b1a7273d5..816f2b7da 100644 --- a/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs +++ b/Src/Asp.Net/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);