-1
I would like to know how to pass a connection string to my function
,
that’s the local.settings.json
I found in the documentation of Microsoft
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "<language worker>",
"AzureWebJobsStorage": "<connection-string>",
"AzureWebJobsDashboard": "<connection-string>",
"MyBindingConnection": "<binding-connection-string>"
},
"Host": {
"LocalHttpPort": 7071,
"CORS": "*",
"CORSCredentials": false
},
"ConnectionStrings": {
"SQLConnectionString": "<sqlclient-connection-string>"
}
}
I know that so :
var cnnString = Environment.GetEnvironmentVariable("SqlConnectionString");
I can get the application environment variable in Azure, how can I get the same result in my localhost
?