0 votes
in Azure Function by
What is Azure Functions Database Connection String?

1 Answer

0 votes
by

We can access an external database to execute the function.

{

  "IsEncrypted": false,

  "Values": {

    "AzureWebJobsStorage": "UseDevelopmentStorage=true;",

    "AzureWebJobsDashboard": ""

  },

  "ConnectionStrings": {

    "MyConnectionString": "[YourConnectionStringHere]"

  }

}

This allows us to use the ConfigurationManager.ConnectionStrings[] we are all used to.

var sqlConnection = ConfigurationManager

                   .ConnectionStrings["MyConnectionString"].ConnectionString;

Related questions

0 votes
asked Mar 16, 2022 in Azure Function by sharadyadav1986
0 votes
asked Mar 16, 2022 in Azure Function by sharadyadav1986
...