Ejemplo n.º 1
0
        protected DbCommonBulkCopy CreateBulkCopy(string ConnectionString, bool isTransaction = false)
        {
            if (dbBulkCopy != null)
            {
                dbBulkCopy.Dispose();
            }

            if (isTransaction)
            {
                dbBulkCopy = new DbCommonBulkCopy(DbProviderType, ConnectionString, CreateConnection(ConnectionString));
            }
            else
            {
                dbBulkCopy = new DbCommonBulkCopy(DbProviderType, ConnectionString);
            }

            return(dbBulkCopy);
        }