Skip to content

Commit 7eeb353

Browse files
committed
Update README.md
1 parent dcf675b commit 7eeb353

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ SQLBulkCopy is useful to copy between databases, but truncating the destination
66
An alternative workflow is to use SQLBulkCopy to copy to a temporary table and then run SQL MERGE between the temporary table and target.
77
Some other solutions that do this require extra work defining the table schemas or are dependant on a SQL stored proc.
88

9-
This library has the following methods:
9+
## Workflows
10+
This library has the following workflows.
1011

11-
## CopyAndMerge
12+
### Copy & Merge
1213
Uses SQLBulkCopy to copy data from a table or view in the source database to a temporary table in the target database before running SQL MERGE from the temporary table to the destination table.
1314

1415
The specific steps it performs:
@@ -19,7 +20,7 @@ The specific steps it performs:
1920
- Run MERGE statement
2021
- Drop the temp table
2122

22-
### Usage:
23+
#### Usage:
2324
```
2425
var copyService = new SqlBulkCopyMergeService(sourceDbConnectionString, targetDbConnectionString);
2526
var result = await copyService.CopyAndMerge(sourceTableOrView, targetTable);
@@ -38,7 +39,7 @@ var columnMappings = new List<ColumnMapping>
3839
var result = await copyService.CopyAndMerge(sourceTableOrView, targetTable, columnMappings);
3940
```
4041

41-
## CopyLatest
42+
### Copy Latest
4243
For source tables that are only ever added to it is more efficient to copy only the new rows into the target table.
4344
This method copies the latest data determined by the keyColumnName.
4445

@@ -49,7 +50,7 @@ If no keyColumnName is specified, the primary key is used. If more than one prim
4950

5051
The result of the source query is directly copied into the target table using SQLBulkCopy.
5152

52-
### Usage:
53+
#### Usage:
5354
```
5455
var copyService = new SqlBulkCopyMergeService(sourceDbConnectionString, targetDbConnectionString);
5556
var result = await copyService.CopyLatest(sourceTableOrView, targetTable, keyColumnName);

0 commit comments

Comments
 (0)