Skip to content

Commit

Permalink
Create batch-save-changes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMagnan authored Aug 15, 2018
1 parent 917962b commit 021cf50
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/pages/features/batch-save-changes.md
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

0 comments on commit 021cf50

Please sign in to comment.