แก้ไข

แชร์ผ่าน


DbTransaction.ReleaseAsync(String, CancellationToken) Method

Definition

Destroys a savepoint previously defined in the current transaction. This allows the system to reclaim some resources before the transaction ends.

public virtual System.Threading.Tasks.Task ReleaseAsync (string savepointName, System.Threading.CancellationToken cancellationToken = default);
abstract member ReleaseAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ReleaseAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function ReleaseAsync (savepointName As String, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

savepointName
String

The name of the savepoint to release.

cancellationToken
CancellationToken

An optional token to cancel the asynchronous operation. The default value is None.

Returns

A Task representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Release(String).

Applies to