I\'m using EF core 2.0 in Azure Functions using .net core. I\'m trying to read db ConnectionString from local.settings.json, which is defined:
{
\"IsEncryp
You can use Environment.GetEnvironmentVariable. The keys are "ConnectionStrings:YourKey"
Assuming your local.settings.json looks like the following:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true"
},
"ConnectionStrings": {
"sqldb_connection": "connection_string_here"
}
}
Use Environment.GetEnvironmentVariable("ConnectionStrings:sqldb_connection", EnvironmentVariableTarget.Process);
to get the value