2
How to bind Azure Cosmodb to Visual Studio in Azure Functions?
Note the code below, the inputDocument parameter would be the Cosmosdb Bind. When we create Funcão direct in the Azure portal, it already does this automatically because it already creates the connections in the file local.settings.json
.
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using System.Collections.Generic;
namespace CDPCompare
{
public static class CallWS
{
[FunctionName("TimerTriggerCSharp")]
public static void Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, TraceWriter log, IEnumerable<dynamic> inputDocument)
{
foreach(var item in inputDocument)
{
log.Info(item);
}
}
}
}
Show us what you’ve done, and what error is occurring, so we can help.
– Thiago Lunardi
Read this post to understand how the auto reply https://answall.com/help/self-answerworks
– UzumakiArtanis
@Was Uzumakiartanis worth the tip? I’m not getting an answer to my own question... Is it because it’s pending?
– mcamara
Yes, when a question is marked as [pending], [duplicated], [closed] it is impossible for you to make changes to it @miltoncamara.
– UzumakiArtanis
@Uzumakiartanis I got it... I’ll wait for it to be reopened then, one more point! Thank you very much :)
– mcamara
It was voted to reopen @miltoncamara and now you can rewrite the post correctly. Make your edits and leave your post within the site standard.
– UzumakiArtanis