dotnet / dotnet/efcore

Cosmos: Upsert

Open
#33,201 0 comments 4 reactions 0 assignees View on GitHub
area-cosmos
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

This is the example SDK code for upsert:

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

ItemResponse response = await container.UpsertItemAsync(
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.