Last active
August 28, 2017 13:56
-
-
Save dontpaniclabsgists/f2989c2e03d10d908ad5d49a14727379 to your computer and use it in GitHub Desktop.
Cosmos2_4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<Note> ReadOne(string id, string customerId) | |
{ | |
using (var client = new DocumentClient(new Uri(_endpoint), _key)) | |
{ | |
var link = UriFactory.CreateDocumentUri(_databaseId, CollectionId, id); | |
var note = await client.ReadDocumentAsync<Note>(link, | |
new RequestOptions() | |
{ | |
PartitionKey = new Microsoft.Azure.Documents.PartitionKey(customerId) | |
}); | |
return note; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment