Skip to content

Instantly share code, notes, and snippets.

@ealsur ealsur/run.csx

Created Jan 30, 2018
What would you like to do?
Azure Cosmos DB + Functions Cookbook - output collector run.csx
using System.Net;
public class MyClass {
public string id {get;set;}
public string name {get;set;}
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, MyClass[] classes, TraceWriter log, IAsyncCollector<MyClass> documentsToStore)
log.Info($"Detected {classes.Length} incoming documents");
foreach(MyClass aClass in classes){
await documentsToStore.AddAsync(aClass);
return req.CreateResponse(HttpStatusCode.Created);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.