Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ItemResponse<ToDoActivity> readItemResponse = await this.container.ReadItemAsync(
id: "<id>",
new PartitionKey("<partitionKeyValue>"));
ToDoActivity someItem = readItemResponse.Resource;
// Apply some modification
someItem.value = 5;
ItemResponse<ToDoActivity> itemResponse = await this.container.ReplaceItemAsync<ToDoActivity>(
id: "<id>",
item: someItem,
new PartitionKey("<partitionKeyValue>"));
// But responseContent is equal to someItem, right? Do we need it?
ToDoActivity responseContent = itemResponse.Resource;
double consumedRus = itemResponse.Headers.RequestCharge;
string etag = itemResponse.Headers.ETag;
string session = itemResponse.Headers.Session;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment