Last active
August 6, 2019 06:24
-
-
Save aranm/067a7245b02db4148a086408d83b9948 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[assembly: FunctionsStartup(typeof(Startup))] | |
namespace MyFunctionsProject | |
{ | |
public class Startup : FunctionsStartup | |
{ | |
public override void Configure(IFunctionsHostBuilder builder) | |
{ | |
// this will bind to the "Values" section of the configuration | |
builder | |
.Services | |
.AddOptions<ApplicationSettings>() | |
.Configure<IConfiguration>((settings, configuration) => { configuration.Bind(settings); }); | |
// this will bind to a specific section of the configuration | |
// by using the section name, in this case "ConnectionStrings" | |
builder | |
.Services | |
.AddOptions<ConnectionStrings>() | |
.Configure<IConfiguration>((settings, configuration) => { configuration.Bind("ConnectionStrings", settings); }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment