- 优化 BulkCopy 默认插入自增键;

- 优化 BulkCopy 对可空类型的属性处理;#227
This commit is contained in:
28810
2020-03-11 14:06:28 +08:00
parent 9f0e28bcac
commit 720960af14
4 changed files with 19 additions and 11 deletions

View File

@ -52,7 +52,7 @@ public static partial class FreeSqlPostgreSQLGlobalExtensions
var insert = that as FreeSql.PostgreSQL.Curd.PostgreSQLInsert<T>;
if (insert == null) throw new Exception("ExecutePgCopy 是 FreeSql.Provider.PostgreSQL 特有的功能");
var dt = that.ToDataTable();
var dt = that.InsertIdentity().ToDataTable();
if (dt.Rows.Count == 0) return;
Action<NpgsqlConnection> binaryImport = conn =>
@ -124,7 +124,7 @@ public static partial class FreeSqlPostgreSQLGlobalExtensions
var insert = that as FreeSql.PostgreSQL.Curd.PostgreSQLInsert<T>;
if (insert == null) throw new Exception("ExecutePgCopyAsync 是 FreeSql.Provider.PostgreSQL 特有的功能");
var dt = that.ToDataTable();
var dt = that.InsertIdentity().ToDataTable();
if (dt.Rows.Count == 0) return;
Func<NpgsqlConnection, Task> binaryImportAsync = async conn =>
{