Skip to content

Instantly share code, notes, and snippets.

@dontpaniclabsgists
Created August 23, 2017 15:15
Show Gist options
  • Save dontpaniclabsgists/e3fc7cf335063b7de0dd667e45d1ad32 to your computer and use it in GitHub Desktop.
Save dontpaniclabsgists/e3fc7cf335063b7de0dd667e45d1ad32 to your computer and use it in GitHub Desktop.
Cosmos1_7
public async Task<Note> Create(Note note)
{
using (var client = new DocumentClient(new Uri(_endpoint), _key))
{
var link = UriFactory.CreateDocumentCollectionUri(_databaseId, CollectionId);
await client.CreateDocumentAsync(link, note);
return note;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment