Hi @Anonymous
Welcome to Microsoft Q&A! Thanks for posting the question.
You need to define as below for your local.settings.json
private static readonly string _BVProdConnectionString = Environment.GetEnvironmentVariable("ConnectionStrings:BlueVoltConnection");
If your local.settings.json would be define as key value pair in Values section as below :
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"BlueVoltConnection": "Server=tcp:xxx.database.windows.net,1433;Initial Catalog=RC-BV;Persist Security Info=False;User ID=xxxxx;Password=xxxxxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},
"ConnectionStrings": {
}
}
In the above case, you can define it as
private static readonly string _BVProdConnectionString = Environment.GetEnvironmentVariable("BlueVoltConnection");
To learn more on local.setting.json you can refer to this.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.