Skip to content

Cosmos: Upsert #33201

@ajcvickers

Description

@ajcvickers

This is the example SDK code for upsert:

Product item = new(
    id: "68719518391",
    category: "gear-surf-surfboards",
    name: "Yamba Surfboard",
    quantity: 12,
    price: 850.00m,
    clearance: false
);

ItemResponse<Product> response = await container.UpsertItemAsync<Product>(
    item: item,
    partitionKey: new PartitionKey("gear-surf-surfboards")
);

Obviously, related to #4526, and we should align experience and API, but I expect the implementation will be quite Cosmos-specific, hence a separate issue.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions