mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 完善 SqlServer BulkCopy 插入 DateTime 最小值问题;
This commit is contained in:
parent
7c2b7ea5ef
commit
f7e22037fe
@ -693,6 +693,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
else
|
||||
val = Utils.GetDataReaderValue(col.Item2, val);
|
||||
}
|
||||
switch (_orm.Ado.DataType)
|
||||
{
|
||||
case DataType.SqlServer:
|
||||
case DataType.OdbcSqlServer:
|
||||
if (val?.Equals(DateTime.MinValue) == true) val = new DateTime(1970, 1, 1);
|
||||
break;
|
||||
}
|
||||
row[rowIndex++] = val;
|
||||
}
|
||||
dt.Rows.Add(row);
|
||||
|
Loading…
x
Reference in New Issue
Block a user