ASP.NET Core Configuration
ASP.NET Core Configuration - Reloading, Binding, Injecting
Introduction In the last post, we talked about ASP.NET Core Configuration in general. We saw how is it set up by default from ASP.NET Core. We also talked about sources and that order matters. This time we will talk about mapping configuration to classes.
ASP.NET Core Configuration
Introduction ASP.NET Core configuration differs greatly from standard ASP.NET. Instead of web.config or any other way to set up the configuration we use built-in Configuration framework that comes with ASP.NET Core. It is still key-value pairs collection at the end, but we can obtain those values from various sources. One of default sources is appsettings.json file that comes with all templates. ASP.NET Core 2 templates have configuration already filled with values from appsettings.json file, along with few other sources. However, we can use and combine various sources for configuration settings (values):