#dotnetcore #aspnetcore #configuration
Configuration management is extremely important for every application. In this video, I will walk through how to extract and use configuration values in an ASP.NET Core Web Application.
The ASP.NET Core provides out of box features through the CreateDefaultBuilder extension method, which makes it extremely easy to use configuration. Apart from getting values directly from the configuration file, the IConfiguration interface exposes environment variables as well.
Using the ConfigureAppConfiguration extension method, we can also add our custom configuration file apart from the appsettings.json file. And even for the custom configuration file, we can keep environment-specific configuration files.
We can also use the extension method AddCommandLine to dynamically replace configurations with command line arguments. In my video, I will cover this feature as well.
Event for accessing the configuration variables, there are multiple ways to get it. And in this video, I will show all the possible ways we can extract the configuration from configuration file. I will also cover how we can inject the configuration values in the dependency injection container.
The source code of this video is available in GitHub here: https://github.com/choudhurynirjhar/c...