File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/providers/WorkflowCore.Persistence.MongoDB Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 12
12
using WorkflowCore . Interface ;
13
13
using WorkflowCore . Models ;
14
14
using System . Threading ;
15
+ using MongoDB . Extensions . Transactions ;
15
16
16
17
namespace WorkflowCore . Persistence . MongoDB . Services
17
18
{
@@ -115,13 +116,13 @@ static void CreateIndexes(MongoPersistenceProvider instance)
115
116
}
116
117
}
117
118
118
- private IMongoCollection < WorkflowInstance > WorkflowInstances => _database . GetCollection < WorkflowInstance > ( WorkflowCollectionName ) ;
119
+ private IMongoCollection < WorkflowInstance > WorkflowInstances => _database . GetCollection < WorkflowInstance > ( WorkflowCollectionName ) . AsTransactionCollection ( ) ;
119
120
120
- private IMongoCollection < EventSubscription > EventSubscriptions => _database . GetCollection < EventSubscription > ( "wfc.subscriptions" ) ;
121
+ private IMongoCollection < EventSubscription > EventSubscriptions => _database . GetCollection < EventSubscription > ( "wfc.subscriptions" ) . AsTransactionCollection ( ) ;
121
122
122
- private IMongoCollection < Event > Events => _database . GetCollection < Event > ( "wfc.events" ) ;
123
+ private IMongoCollection < Event > Events => _database . GetCollection < Event > ( "wfc.events" ) . AsTransactionCollection ( ) ;
123
124
124
- private IMongoCollection < ExecutionError > ExecutionErrors => _database . GetCollection < ExecutionError > ( "wfc.execution_errors" ) ;
125
+ private IMongoCollection < ExecutionError > ExecutionErrors => _database . GetCollection < ExecutionError > ( "wfc.execution_errors" ) . AsTransactionCollection ( ) ;
125
126
126
127
public async Task < string > CreateNewWorkflow ( WorkflowInstance workflow , CancellationToken cancellationToken = default )
127
128
{
Original file line number Diff line number Diff line change 22
22
</ItemGroup >
23
23
24
24
<ItemGroup >
25
- <PackageReference Include =" MongoDB.Driver" Version =" 2.8.1" />
25
+ <PackageReference Include =" MongoDB.Driver" Version =" 2.12.2" />
26
+ <PackageReference Include =" MongoDB.Extensions.Transactions" Version =" 0.8.0" />
26
27
<PackageReference Include =" Newtonsoft.Json" Version =" 12.0.1" />
27
28
</ItemGroup >
28
29
You can’t perform that action at this time.
0 commit comments