You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
I have a generic service using the CosmonautClient and using shared collections, this is a single service with a single POST method that I then use to post Queries or Commands to the endpoint and return the relevant entity.
Everything in this setup works with the exception of the DeleteDocumentAsync method call which returns null and the subsequent query agains the same collection yields results containing the "deleted" document
var deleted = await this._cosmonautClient.DeleteDocumentAsync(this._databaseName, collectionName, message.Id, new RequestOptions { PartitionKey = new PartitionKey("id") });
Can you advise if this is a problem please?
NOTE: I have also tried getting the SelfLink and using the DocumentClient to delete the document this way but I get an exception stating the resource does not exist
The text was updated successfully, but these errors were encountered:
You need to provide the partition key value not the partition key definition when you delete. Your delete request should look like this, assuming the id is your partition key.
var deleted = await this._cosmonautClient.DeleteDocumentAsync(this._databaseName, collectionName, message.Id, new RequestOptions { PartitionKey = new PartitionKey(message.Id) });
I have a generic service using the
CosmonautClient
and using shared collections, this is a single service with a single POST method that I then use to post Queries or Commands to the endpoint and return the relevant entity.Everything in this setup works with the exception of the
DeleteDocumentAsync
method call which returnsnull
and the subsequent query agains the same collection yields results containing the "deleted" documentCan you advise if this is a problem please?
NOTE: I have also tried getting the
SelfLink
and using theDocumentClient
to delete the document this way but I get an exception stating the resource does not existThe text was updated successfully, but these errors were encountered: