Table of Contents

Class TransactionExtensions

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

Core non-DB-specific extensions for database transactions.

[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Overload for easier consumption.")]
public static class TransactionExtensions
Inheritance
TransactionExtensions
Inherited Members

Methods

CreateCommand(DbTransaction, CommandType, string, int)

Shortcut for creating an DbCommand from any DbTransaction.

CreateCommand(IDbTransaction, CommandType, string, int)

Shortcut for creating an IDbCommand from any IDbTransaction.

CreateStoredProcedureCommand(DbTransaction, string, int)

Shortcut for creating a stored procedure DbCommand from any DbTransaction.

CreateStoredProcedureCommand(IDbTransaction, string, int)

Shortcut for creating a stored procedure IDbCommand from any IDbTransaction.

CreateTextCommand(DbTransaction, string, int)

Shortcut for creating a text DbCommand from any DbTransaction.

CreateTextCommand(IDbTransaction, string, int)

Shortcut for creating a text IDbCommand from any IDbTransaction.

ExecuteTransaction(DbConnection, Action<DbTransaction>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransaction(DbConnection, Action<DbTransaction>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransaction(DbConnection, IsolationLevel, Action<DbTransaction>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransaction(DbConnection, IsolationLevel, CancellationToken, Action<DbTransaction>)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransaction(DbConnection, CancellationToken, Action<DbTransaction>)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionAsync(DbConnection, IsolationLevel, Func<DbTransaction, ValueTask>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransactionAsync(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, ValueTask>)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransactionAsync(DbConnection, Func<DbTransaction, ValueTask>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionAsync(DbConnection, Func<DbTransaction, ValueTask>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionAsync(DbConnection, CancellationToken, Func<DbTransaction, ValueTask>)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionAsync<T>(DbConnection, IsolationLevel, Func<DbTransaction, ValueTask<T>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransactionAsync<T>(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, ValueTask<T>>)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransactionAsync<T>(DbConnection, Func<DbTransaction, ValueTask<T>>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionAsync<T>(DbConnection, Func<DbTransaction, ValueTask<T>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionAsync<T>(DbConnection, CancellationToken, Func<DbTransaction, ValueTask<T>>)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditional(DbConnection, IsolationLevel, Func<DbTransaction, bool>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the conditional action returns true. Otherwise rolls-back the transaction.

ExecuteTransactionConditional(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, bool>)

Begins a transaction before executing the action. Commits if there are no exceptions and the conditional action returns true. Otherwise rolls-back the transaction.

ExecuteTransactionConditional(DbConnection, Func<DbTransaction, bool>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the conditional action returns true, and the optional cancellation token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditional(DbConnection, Func<DbTransaction, bool>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the conditional action returns true, and the optional cancellation token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditional(DbConnection, CancellationToken, Func<DbTransaction, bool>)

Begins a transaction before executing the action. Commits if there are no exceptions, the conditional action returns true, and the optional cancellation token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync(DbConnection, IsolationLevel, Func<DbTransaction, ValueTask<bool>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the value from the action is true. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, ValueTask<bool>>)

Begins a transaction before executing the action. Commits if there are no exceptions and the value from the action is true. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync(DbConnection, Func<DbTransaction, ValueTask<bool>>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true, and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync(DbConnection, Func<DbTransaction, ValueTask<bool>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true, and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync(DbConnection, CancellationToken, Func<DbTransaction, ValueTask<bool>>)

Begins a transaction before executing the action. Commits if there are no exceptions, the value from the action is true, and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, IsolationLevel, Func<DbTransaction, ValueTask<(bool Commit, T Value)>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the 'Commit' value from the action is true. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, ValueTask<(bool Commit, T Value)>>)

Begins a transaction before executing the action. Commits if there are no exceptions and the 'Commit' value from the action is true. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, Func<DbTransaction, CancellationToken, ValueTask<(bool Commit, T Value)>>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true and the optional cancellation token has not been cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, Func<DbTransaction, CancellationToken, ValueTask<(bool Commit, T Value)>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true and the optional cancellation token has not been cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, Func<DbTransaction, ValueTask<(bool Commit, T Value)>>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true, and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, Func<DbTransaction, ValueTask<(bool Commit, T Value)>>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true, and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditionalAsync<T>(DbConnection, CancellationToken, Func<DbTransaction, ValueTask<(bool Commit, T Value)>>)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true, and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditional<T>(DbConnection, IsolationLevel, Func<DbTransaction, (bool Commit, T Value)>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and 'Commit' value from the action is true. Otherwise rolls-back the transaction.

ExecuteTransactionConditional<T>(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, (bool Commit, T Value)>)

Begins a transaction before executing the action. Commits if there are no exceptions and 'Commit' value from the action is true. Otherwise rolls-back the transaction.

ExecuteTransactionConditional<T>(DbConnection, Func<DbTransaction, (bool Commit, T Value)>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true and the optional cancellation token has not been cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditional<T>(DbConnection, Func<DbTransaction, (bool Commit, T Value)>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true and the optional cancellation token has not been cancelled. Otherwise rolls-back the transaction.

ExecuteTransactionConditional<T>(DbConnection, CancellationToken, Func<DbTransaction, (bool Commit, T Value)>)

Begins a transaction before executing the action. Commits if there are no exceptions, the 'Commit' value from the action is true and the optional cancellation token has not been cancelled. Otherwise rolls-back the transaction.

ExecuteTransaction<T>(DbConnection, IsolationLevel, Func<DbTransaction, T>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransaction<T>(DbConnection, IsolationLevel, CancellationToken, Func<DbTransaction, T>)

Begins a transaction before executing the action. Commits if there are no exceptions. Otherwise rolls-back the transaction.

ExecuteTransaction<T>(DbConnection, Func<DbTransaction, T>, IsolationLevel, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransaction<T>(DbConnection, Func<DbTransaction, T>, CancellationToken)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.

ExecuteTransaction<T>(DbConnection, CancellationToken, Func<DbTransaction, T>)

Begins a transaction before executing the action. Commits if there are no exceptions and the optional provided token is not cancelled. Otherwise rolls-back the transaction.