Skip to content

Instantly share code, notes, and snippets.

@JeremyLikness
Created October 9, 2017 19:01
Show Gist options
  • Select an option

  • Save JeremyLikness/8bf3d2d79143b7a8cfaf1fe4a953f997 to your computer and use it in GitHub Desktop.

Select an option

Save JeremyLikness/8bf3d2d79143b7a8cfaf1fe4a953f997 to your computer and use it in GitHub Desktop.
Create a document to write to CosmosDB
// cosmos DB
doc = new ExpandoObject();
doc.id = Guid.NewGuid().ToString();
doc.page = page;
doc.count = 1;
doc.timestamp = date;
if (!string.IsNullOrWhiteSpace(customEvent))
{
((IDictionary<string, object>)doc).Add(customEvent, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment