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 1212using WorkflowCore . Interface ;
1313using WorkflowCore . Models ;
1414using System . Threading ;
15+ using MongoDB . Extensions . Transactions ;
1516
1617namespace WorkflowCore . Persistence . MongoDB . Services
1718{
@@ -115,13 +116,13 @@ static void CreateIndexes(MongoPersistenceProvider instance)
115116 }
116117 }
117118
118- private IMongoCollection < WorkflowInstance > WorkflowInstances => _database . GetCollection < WorkflowInstance > ( WorkflowCollectionName ) ;
119+ private IMongoCollection < WorkflowInstance > WorkflowInstances => _database . GetCollection < WorkflowInstance > ( WorkflowCollectionName ) . AsTransactionCollection ( ) ;
119120
120- private IMongoCollection < EventSubscription > EventSubscriptions => _database . GetCollection < EventSubscription > ( "wfc.subscriptions" ) ;
121+ private IMongoCollection < EventSubscription > EventSubscriptions => _database . GetCollection < EventSubscription > ( "wfc.subscriptions" ) . AsTransactionCollection ( ) ;
121122
122- private IMongoCollection < Event > Events => _database . GetCollection < Event > ( "wfc.events" ) ;
123+ private IMongoCollection < Event > Events => _database . GetCollection < Event > ( "wfc.events" ) . AsTransactionCollection ( ) ;
123124
124- private IMongoCollection < ExecutionError > ExecutionErrors => _database . GetCollection < ExecutionError > ( "wfc.execution_errors" ) ;
125+ private IMongoCollection < ExecutionError > ExecutionErrors => _database . GetCollection < ExecutionError > ( "wfc.execution_errors" ) . AsTransactionCollection ( ) ;
125126
126127 public async Task < string > CreateNewWorkflow ( WorkflowInstance workflow , CancellationToken cancellationToken = default )
127128 {
Original file line number Diff line number Diff line change 2222 </ItemGroup >
2323
2424 <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" />
2627 <PackageReference Include =" Newtonsoft.Json" Version =" 12.0.1" />
2728 </ItemGroup >
2829
You can’t perform that action at this time.
0 commit comments