Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cosmos DB in Azure Functions V1 and V2
[FunctionName("ProductUpsertHttpTrigger")]
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "products")] HttpRequest req,
[CosmosDB(
databaseName: "%CosmosDbDdatabaseName%",
collectionName: "%CosmosDbCollectionName%")] IAsyncCollector<Product> collector,
TraceWriter log)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment