Class MongoTransaction
- Namespace
- MongoDB.EntityFrameworkCore.Storage
- Assembly
- MongoDB.EntityFrameworkCore.dll
Provides an EF-friendly wrapper around a MongoDB transaction.
public sealed class MongoTransaction : IDbContextTransaction, IDisposable, IAsyncDisposable
- Inheritance
-
MongoTransaction
- Implements
- Inherited Members
Constructors
- MongoTransaction(IClientSession, DbContext, Guid, IDiagnosticsLogger<Transaction>)
Provides an EF-friendly wrapper around a MongoDB transaction.
Properties
- TransactionId
Gets the transaction identifier.
- TransactionOptions
Obtain the TransactionOptions for this transaction.
Methods
- Commit()
Commits all changes made to the database in the current transaction.
- CommitAsync(CancellationToken)
Commits all changes made to the database in the current transaction asynchronously.
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
- Rollback()
Discards all changes made to the database in the current transaction.
- RollbackAsync(CancellationToken)
Discards all changes made to the database in the current transaction asynchronously.