你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TableClient.SubmitTransactionAsync Method

Definition

Submits the batch transaction to the service for execution. The sub-operations contained in the batch will either succeed or fail together as a transaction.

public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Response>>> SubmitTransactionAsync(System.Collections.Generic.IEnumerable<Azure.Data.Tables.TableTransactionAction> transactionActions, System.Threading.CancellationToken cancellationToken = default);
abstract member SubmitTransactionAsync : seq<Azure.Data.Tables.TableTransactionAction> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Response>>>
override this.SubmitTransactionAsync : seq<Azure.Data.Tables.TableTransactionAction> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Response>>>
Public Overridable Function SubmitTransactionAsync (transactionActions As IEnumerable(Of TableTransactionAction), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of Response)))

Parameters

transactionActions
IEnumerable<TableTransactionAction>

The IEnumerable<T> containing the TableTransactionActions to submit to the service.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Response<T> containing a IReadOnlyList<T> of Response. Each sub-response in the collection corresponds to the TableTransactionAction provided to the transactionActions parameter at the same index position. Each response can be inspected for details for its corresponding table operation, such as the Headers property containing the ETag

Exceptions

Thrown when the batch transaction operation fails.

Thrown when transactionActions is null.

Thrown if the batch has been previously submitted.

Applies to