Repository navigation
The library is async only, every method takes a cancellation token, and there is a merge operation, a bulk copy that merges, and a transaction object on which the data methods run together. AGENT_PRIMER.md describes the whole library and every breaking change since 1.x.
Breaking changes
- Every synchronous method is removed. Each server-facing method exists only as
...Async, and the methods that had no async form, the schema lookups,GetLastBackupDateTime,IndexCreateandIndexDrop, are...Asyncnow. To upgrade, appendAsyncto the name andawaitthe call.QueryBuilderandSQLServerConnectionStringare unchanged. - Every method takes an optional
CancellationTokenas its last parameter. Existing calls compile unchanged, but assemblies built against 1.x or 2.x must be recompiled: the parameter changes the methods' signatures, so a DLL swapped under built code fails withMissingMethodException. GetTableIndexsis renamedGetTableIndexesAsync.
Additions
MergeDataAsyncmerges one table into another with aMERGEstatement: a target row whose key columns match a source row is updated, a source row with no match is inserted, and withdeleteUnmatcheda target row with no match is deleted. Every name is quoted as an identifier, and the method returns the number of rows affected.BulkMergeAsyncbulk copies a DataTable into a temporary table and merges it into the destination in one transaction, matching columns by name. It takes the samedeleteUnmatched, atimeoutfor the copy and the merge, andbatchSize.- Both take
useTransaction, true by default, asBulkCopyAsyncdoes. BeginTransactionAsyncreturns aSQLServerTransaction: one connection and one transaction on which the queries, commands, inserts, updates, deletes, merges and bulk copies run together, with the same signatures as onSQLServerInstance.CommitAsynccommits; disposing without a commit rolls back. It takes an optionalIsolationLevel.ExecuteTransactionAsyncnow runs through that object. Its behavior is unchanged.SQLServerTransactionalso carriesIndexCreateAsyncandIndexDropAsync, and savepoints:SaveAsync(name)marks one andRollbackToAsync(name)undoes the work since it while the transaction stays open.- The repository has a compatibility catalogue: scenarios that run on the 1.1.1 package and on the current library in CI, recording what each does, so every behavior change listed for 2.0.0 and 3.0.0 is observed on both.