private static void SyncTable(SqlConnection targetConn, TableSchema tableSchema, SqlConnection sourceConn) { try { targetConn.CreateSyncTable(tableSchema); sourceConn.BulkCopyData(targetConn, tableSchema); targetConn.MergeData(tableSchema); } finally { targetConn.DropSyncTable(tableSchema); } }