Skip to content

TransactionContext Methods

Provides access to the transaction associated with the current asynchronous execution context.

GetRequiredTransactionInfo

static
View source
public static TransactionInfo GetRequiredTransactionInfo()
Gets the current transaction information.

Returns

The current transaction information.

Exceptions

Orleans.Transactions.OrleansTransactionException
There is no transaction in the current context.

GetTransactionInfo

static
View source
public static TransactionInfo? GetTransactionInfo()
Gets the current transaction information.

Returns

The current transaction information, or null when no transaction is active.