I am learning micorosoft azure and facing this issue. My Document is :
{
"customerid": 1,
"customername": "Ron",
"city": "NewYork",
"id": "0c288834-fc7d-4f9d-95c7-722596e275c8"
}
My Code is:
CosmosClient cosmosClient = new CosmosClient(endPoint, accountKey);
Database database = cosmosClient.GetDatabase(databaseName);
Container container = database.GetContainer(conatinerName);
PartitionKey pk = new PartitionKey("NewYork");
string id = "0c288834-fc7d-4f9d-95c7-722596e275c8";
ItemResponse<customer> t =container.DeleteItemAsync<customer>(id, pk).Result;
Every time i get the same error: One or more errors occurred. (Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: f40e6c70-589a-43d3-a329-aa4564fcc630; Reason: ({ "Errors": [ "Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"]});)
The error is not clear.Please help me to find the solution