I am trying to update a document in Azure CosmosDB collection using ReplaceDocumentAsyc method provided by microsoft.azure.documentdb.core package. I get a 200 response when ReplaceDocumentAsyc is called but the document in collection itself is not getting updated. Here is the brief setup (relevent part of code) for reference.
private DocumentClient Client
{
get
{
if (_client == null)
{
_client = new DocumentClient(new Uri(EndpointUrl), AuthorizationKey);
}
return _client;
}
}
Client.ReplaceDocumentAsync(documentSelfLink, doc).ContinueWith(response =>
{
return new QueryResponse { Success = response.Result.StatusCode == HttpStatusCode.OK, LastChanged = lastChanged };
});
The code seems fine to me and I believe it was able to update the collection before. Has anyone else faced similar issue?
docobject contain theidproperty of the document?