Posts

Showing posts from January, 2019

Azure Function Binding Declaration Types

If you are familiar with azure function you may already know there are many types of binding. If you are new for azure function bindings you can read more details here . When adding an output binding for your function code there are two ways of doing it. 1. Declarative Binding 2. Imperative Binding Declarative Binding Suppose we have a CosmosDB output Binding. In Declarative Binding we can specify the binding details in the Run method parameter. This is the most common way most of us using public static class WriteOneDoc { [FunctionName("WriteOneDoc")] public static void Run ( [QueueTrigger("todoqueueforwrite")] string queueMessage, [CosmosDB( databaseName: "ToDoItems", collectionName: "Items", ConnectionStringSetting = "CosmosDBConnection")] out dynamic document, ILogger log) { document = new { De...