Created
February 18, 2018 12:39
-
-
Save justinyoo/2e8f58b30774b3a381995c7b1ab07b89 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")] 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