Skip to content

Commit 1eb97ff

Browse files
authored
Update README.md
1 parent 091f4f6 commit 1eb97ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ services.AddDbContext<ApplicationContext>(options => options.UseTriggers(trigger
118118
services.AddAssemblyTriggers();
119119
```
120120

121+
### DB Context Pooling
122+
When using DbContextPooling, Triggers need additional help in discovering the IServiceProvider that was used to obtain a Lease on the current DbContext. This library exposes an easy-to-use plugin to enable this additional complexity which requires a call to `AddTriggeredDbContextPool`.
123+
124+
```csharp
125+
services.AddDbContextPool<ApplicationDbContext>(...); // Before
126+
services.AddTriggeredDbContextPool<ApplicationDbContext>(...); // After
127+
```
121128

122129
### Cascading changes (previously called Recursion)
123130
`BeforeSaveTrigger<TEntity>` supports cascading triggers. This is useful since it allows your triggers to subsequently modify the same DbContext entity graph and have it raise additional triggers. By default this behavior is turned on and protected from infinite loops by limiting the number of cascading cycles. If you don't like this behavior or want to change it, you can do so by:

0 commit comments

Comments
 (0)