protected override void OnExecute() { if (source == null) { throw new InvalidOperationException(); // *** TODO } if (destination == null) { throw new InvalidOperationException(); // *** TODO } // Create command that reads the table using (var cmd = source.CreateCommand()) { using (var cn = source.OpenConnection()) { using (var tn = cn.BeginTransaction(IsolationLevel.ReadUncommitted)) { cmd.Connection = cn; cmd.Transaction = tn; cmd.CommandTimeout = Timeout; ImportTable(cmd, destination); } } } }
protected void WriteTable(SourceTableQuery source, DataFileBase destination) { // Create command that reads the table using (var cmd = source.CreateCommand()) { using (var cn = source.OpenConnection()) { using (var tn = cn.BeginTransaction(IsolationLevel.ReadUncommitted)) { cmd.Connection = cn; cmd.Transaction = tn; cmd.CommandTimeout = Timeout; WriteTable(cmd, destination); } } } }
protected void WriteTable(SourceTableQuery source, DataFileBase destination) { // Create command that reads the table using (var cmd = source.CreateCommand()) { using (var cn = source.OpenConnection()) { using (var tn = cn.BeginTransaction(IsolationLevel.ReadUncommitted)) { cmd.Connection = cn; cmd.Transaction = tn; cmd.CommandTimeout = Timeout; WriteTable(cmd, destination); } } } }