Class DataConnectionTransaction
Data connection transaction controller.
public class DataConnectionTransaction : IDisposable, IAsyncDisposable
- Inheritance
-
DataConnectionTransaction
- Implements
- Extension Methods
Constructors
DataConnectionTransaction(DataConnection)
Creates new transaction controller for data connection.
public DataConnectionTransaction(DataConnection dataConnection)
Parameters
dataConnection
DataConnectionData connection instance.
Properties
DataConnection
Returns associated data connection instance.
public DataConnection DataConnection { get; }
Property Value
Methods
Commit()
Commits current transaction for data connection.
public void Commit()
CommitAsync(CancellationToken)
Commits current transaction for data connection asynchonously. If underlying provider doesn't support asynchonous commit, it will be performed synchonously.
public Task CommitAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenAsynchronous operation cancellation token.
Returns
- Task
Asynchronous operation completion task.
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 Task DisposeAsync()
Returns
Rollback()
Rolllbacks current transaction for data connection.
public void Rollback()
RollbackAsync(CancellationToken)
Rollbacks current transaction for data connection asynchonously. If underlying provider doesn't support asynchonous rollback, it will be performed synchonously.
public Task RollbackAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenAsynchronous operation cancellation token.
Returns
- Task
Asynchronous operation completion task.