-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
917962b
commit 021cf50
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BatchSaveChanges | ||
|
||
## Description | ||
You can reduce the number of database roundtrip by batching multiple command in the same command. The BatchSaveChanges and BatchSaveChangesAsync methods work exactly like SaveChanges but way faster. | ||
If the provider doesn’t support multiple statement, the logic will automatically fall back to SaveChanges. | ||
|
||
### Provider Supported | ||
- SQL Server | ||
|
||
## Examples | ||
```csharp | ||
``` | ||
[Try it](https://dotnetfiddle.net/tuONVZ) | ||
|
||
## Options | ||
|
||
### IsEnabled | ||
When disabled, the BatchSaveChanges will use SaveChanges instead. | ||
|
||
### UseBatchForSaveChanges | ||
When enabled, the SaveChanges will use BatchSaveChanges if the provider support multiple statements. | ||
|
||
## Limitations | ||
- Stored Procedure will continue to use SaveChanges |