public async Task UpdateAsync(SyncState state, CancellationToken cancellationToken = default) { TableClient tableClient = _tableServiceClient.GetTableClient(Constants.SyncStateTableName); var entity = new SyncStateEntity(state); await tableClient.UpsertEntityAsync(entity, cancellationToken : cancellationToken); }
public async Task UpdateAsync(SyncState state, CancellationToken cancellationToken = default) { CloudTable table = _client.GetTableReference(Constants.SyncStateTableName); TableEntity entity = new SyncStateEntity(state); TableOperation operation = TableOperation.InsertOrReplace(entity); await table.ExecuteAsync(operation, cancellationToken); }