Skip to content

Commit 9cb2bc3

Browse files
authored
Update README.md
1 parent 20cda88 commit 9cb2bc3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,15 @@ var triggerSession = triggerService.CreateSession(context); // A trigger session
198198
try {
199199
await context.SaveChangesAsync();
200200
await triggerSession.RaiseBeforeCommitTriggers();
201+
await context.CommitAsync();
202+
await triggerSession.RaiseAfterCommitTriggers();
201203
}
202204
catch {
203205
await triggerSession.RaiseBeforeRollbackTriggers();
204206
await context.RollbackAsync();
205207
await triggerSession.RaiseAfterRollbackTriggers();
206208
throw;
207209
}
208-
209-
await context.CommitAsync();
210-
await triggerSession.RaiseAfterCommitTriggers();
211210
```
212211
In this example we were not able to inherit from TriggeredDbContext since we want to manually control the TriggerSession
213212

0 commit comments

Comments
 (0)