Class CloudStorageDbContextTransaction
- Namespace
- CloudStorageORM.Infrastructure
- Assembly
- CloudStorageORM.dll
Transaction wrapper used by CloudStorageTransactionManager.
public sealed class CloudStorageDbContextTransaction : IDbContextTransaction, IDisposable, IAsyncDisposable
- Inheritance
-
CloudStorageDbContextTransaction
- Implements
- Inherited Members
Constructors
CloudStorageDbContextTransaction(CloudStorageTransactionManager)
Transaction wrapper used by CloudStorageTransactionManager.
public CloudStorageDbContextTransaction(CloudStorageTransactionManager transactionManager)
Parameters
transactionManagerCloudStorageTransactionManager
Properties
TransactionId
Gets the transaction identifier.
public Guid TransactionId { get; }
Property Value
Remarks
See Transactions in EF Core for more information and examples.
Methods
Commit()
Commits all changes made to the database in the current transaction.
public void Commit()
Remarks
See Transactions in EF Core for more information and examples.
CommitAsync(CancellationToken)
Commits all changes made to the database in the current transaction asynchronously.
public Task CommitAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA CancellationToken to observe while waiting for the task to complete.
Returns
Remarks
See Transactions in EF Core for more information and examples.
Exceptions
- OperationCanceledException
If the CancellationToken is canceled.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.
Rollback()
Discards all changes made to the database in the current transaction.
public void Rollback()
Remarks
See Transactions in EF Core for more information and examples.
RollbackAsync(CancellationToken)
Discards all changes made to the database in the current transaction asynchronously.
public Task RollbackAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA CancellationToken to observe while waiting for the task to complete.
Returns
Remarks
See Transactions in EF Core for more information and examples.
Exceptions
- OperationCanceledException
If the CancellationToken is canceled.