TableClient.UpsertEntityAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Replaces the specified table entity of type T
, if it exists. Creates the entity if it does not exist.
public virtual System.Threading.Tasks.Task<Azure.Response> UpsertEntityAsync<T> (T entity, Azure.Data.Tables.TableUpdateMode mode = Azure.Data.Tables.TableUpdateMode.Merge, System.Threading.CancellationToken cancellationToken = default) where T : Azure.Data.Tables.ITableEntity;
abstract member UpsertEntityAsync : 'T * Azure.Data.Tables.TableUpdateMode * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response> (requires 'T :> Azure.Data.Tables.ITableEntity)
override this.UpsertEntityAsync : 'T * Azure.Data.Tables.TableUpdateMode * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response> (requires 'T :> Azure.Data.Tables.ITableEntity)
Public Overridable Function UpsertEntityAsync(Of T As ITableEntity) (entity As T, Optional mode As TableUpdateMode = Azure.Data.Tables.TableUpdateMode.Merge, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Type Parameters
- T
A custom model type that implements ITableEntity or an instance of TableEntity.
Parameters
- entity
- T
The entity to upsert.
- mode
- TableUpdateMode
Determines the behavior of the upsert operation when the entity already exists in the table. See TableUpdateMode for more details.
- 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.
Applies to
Azure SDK for .NET
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin