Created
February 18, 2018 12:39
-
-
Save justinyoo/8540f08c5d9d8fdc4e6cfc17802bc40a to your computer and use it in GitHub Desktop.
Cosmos DB in Azure Functions V1 and V2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName("ProductUpsertHttpTrigger")] | |
public static async Task<HttpResponseMessage> Run( | |
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "products")] HttpRequestMessage req, | |
[DocumentDB( | |
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