Skip to content

Instantly share code, notes, and snippets.

@dontpaniclabsgists
Created August 23, 2017 15:16
Show Gist options
  • Save dontpaniclabsgists/9d8069e542403f473b7168c18de403c7 to your computer and use it in GitHub Desktop.
Save dontpaniclabsgists/9d8069e542403f473b7168c18de403c7 to your computer and use it in GitHub Desktop.
Cosmos1_9
public async Task Delete(string id, string customerId)
{
using (var client = new DocumentClient(new Uri(_endpoint), _key))
{
var link = UriFactory.CreateDocumentUri(_databaseId, CollectionId, id);
await client.DeleteDocumentAsync(link, new RequestOptions()
{ PartitionKey = new Microsoft.Azure.Documents.PartitionKey(customerId)});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment