Delen via


TableClient.DeleteEntityAsync Method

Definition

Overloads

DeleteEntityAsync(ITableEntity, ETag, CancellationToken)

Deletes the specified table entity.

DeleteEntityAsync(String, String, ETag, CancellationToken)

Deletes the specified table entity.

DeleteEntityAsync(ITableEntity, ETag, CancellationToken)

Source:
TableClient.cs

Deletes the specified table entity.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteEntityAsync (Azure.Data.Tables.ITableEntity entity, Azure.ETag ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteEntityAsync : Azure.Data.Tables.ITableEntity * Azure.ETag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteEntityAsync : Azure.Data.Tables.ITableEntity * Azure.ETag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteEntityAsync (entity As ITableEntity, Optional ifMatch As ETag = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

entity
ITableEntity

The table entity to delete.

ifMatch
ETag

The If-Match value to be used for optimistic concurrency. If All is specified, the operation will be executed unconditionally. If the ETag value is specified, the operation will fail with a status of 412 (Precondition Failed) if the ETag value of the entity in the table does not match. The default is to delete unconditionally.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

The Response indicating the result of the operation.

Exceptions

The server returned an error. See Message for details returned from the server.

Remarks

Note: This method should not fail because the entity does not exist, however if delete operations are submitted in a TableTransactionAction, the transaction will fail if the entity does not exist.

Applies to

DeleteEntityAsync(String, String, ETag, CancellationToken)

Source:
TableClient.cs

Deletes the specified table entity.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteEntityAsync (string partitionKey, string rowKey, Azure.ETag ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteEntityAsync : string * string * Azure.ETag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteEntityAsync : string * string * Azure.ETag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteEntityAsync (partitionKey As String, rowKey As String, Optional ifMatch As ETag = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

partitionKey
String

The partitionKey that identifies the table entity.

rowKey
String

The rowKey that identifies the table entity.

ifMatch
ETag

The If-Match value to be used for optimistic concurrency. If All is specified, the operation will be executed unconditionally. If the ETag value is specified, the operation will fail with a status of 412 (Precondition Failed) if the ETag value of the entity in the table does not match. The default is to delete unconditionally.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

The Response indicating the result of the operation.

Exceptions

The server returned an error. See Message for details returned from the server.

Remarks

Note: This method should not fail because the entity does not exist, however if delete operations are submitted in a TableTransactionAction, the transaction will fail if the entity does not exist.

Applies to