dotnetcore / dotnetcore/FreeSql
字典插入中日期字段存在bug
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 910
- PR merge metrics
- No merged PRs in 30d
Description
#### 问题描述及重现代码:
Table数据表中存在日期字段,在使用 InsertDict 插入多行数据时,有些行数据的日期字段有值,有些为空值,在插入数据库后,空值的字段值被插入成了固定值“1970-01-01 00:00:00.000”
```c#
// c# code
```
fsql.InsertDict(dic).AsTable("tableName").ExecuteAffrows();
#### 数据库版本
SqlServer 2012
#### 安装的Nuget包
#### .net framework/. net core? 及具体版本
.Net 6


ToSql()的语句如下
INSERT INTO [T_Pai_FormTest_SubLister]([T_Pai_FormTestID], [ID], [SubCheckBox], [SubTextBox], [SubTextArea], [SubDatePicker], [SubComboBox], [SubButtonEdit], [SubButtonEditName], [SubSingleFile], [SubSingleFileName], [SubSpinner], [SortIndex], [IsReleased], [UpperVersionID]) VALUES(N'b1ea0143-d55c-4e0f-9412-0c9ec1c25eb7', N'b1ea0143-e1ec-45c8-93f4-3afaa89f9eed', NULL, N'数据行1', NULL, '2024-09-13 00:00:00.000', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL), (N'b1ea0143-d55c-4e0f-9412-0c9ec1c25eb7', N'b1ea0143-e1ec-4657-8a7f-f2ea4762582c', NULL, N'数据行2', NULL, '1970-01-01 00:00:00.000', NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
数据库中的表字段也是允许为空值的

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.