Skip to content

Instantly share code, notes, and snippets.

@ealsur
Created February 6, 2018 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ealsur/b2d4ec7ac6a1ac0774358869be3e9aa5 to your computer and use it in GitHub Desktop.
Save ealsur/b2d4ec7ac6a1ac0774358869be3e9aa5 to your computer and use it in GitHub Desktop.
Azure Cosmos DB + Functions Cookbook - live migration run.csx
#r "Microsoft.Azure.Documents.Client"
using System;
using System.Collections.Generic;
using Microsoft.Azure.Documents;
public static async Task Run(IReadOnlyList<Document> input, IAsyncCollector<Document> docsToSave)
{
foreach(var doc in input){
// work with the document, process or create a new one
await docsToSave.AddAsync(doc);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment