1 回答

TA貢獻(xiàn)1850條經(jīng)驗(yàn) 獲得超11個(gè)贊
問(wèn)題出在你的partitionKeyValue. 您提供的是分區(qū)鍵定義而不是值。該值是實(shí)際的租戶 id 而不是文本tenantId。
您的刪除代碼應(yīng)如下所示:
private async Task DeleteFamilyItemAsync()
{
var partitionKeyValue = "5c6cb2d77c1c2edc001b9007"; // <-- This is the change
var orderId = "abae8abf-5836-464f-8129-1f0e83a1f639";
// Delete an item. Note we must provide the partition key value and id of the item to delete
ItemResponse<Order> orderResponse = await this.container.DeleteItemAsync<Order>(orderId, new PartitionKey(partitionKeyValue));
Console.WriteLine("Deleted Family [{0},{1}]\n", partitionKeyValue, orderId);
}
- 1 回答
- 0 關(guān)注
- 147 瀏覽
添加回答
舉報(bào)