TransactionalBatch.<T>upsertItemOperation Method

Definition

Overloads

<T>upsertItemOperation(T item)

Adds an operation to upsert an item into the batch.

<T>upsertItemOperation(T item, TransactionalBatchItemRequestOptions requestOptions)

Adds an operation to upsert an item into the batch.

<T>upsertItemOperation(T item)

Adds an operation to upsert an item into the batch.

public CosmosItemOperation <T>upsertItemOperation(T item)

Parameters

item
T

A JSON serializable object that must contain an id property.

Returns

The transactional batch instance with the operation added.

<T>upsertItemOperation(T item, TransactionalBatchItemRequestOptions requestOptions)

Adds an operation to upsert an item into the batch.

public CosmosItemOperation <T>upsertItemOperation(T item, TransactionalBatchItemRequestOptions requestOptions)

Parameters

item
T

A JSON serializable object that must contain an id property.

requestOptions
TransactionalBatchItemRequestOptions

The options for the item request.

Returns

The transactional batch instance with the operation added.

Applies to