public void BulkInsert(IConnectionProvider conn, IEntityCollection newEntities, IEntityDaoFactory daoFactory) { if (newEntities.Count == 0) return; DataTable newRecords = newEntities.ToDataTable(); var bulkCopy = BuildSqlBulkCopy(conn, newEntities.IDbTable.TableName, newRecords); bulkCopy.WriteToServer(newRecords); }