How to add User Secrets in a .NET Core console app

The User Secrets feature in .NET is a safe, simple way to override values in appsettings.json. The overridden values only exist in a file sitting in your own dev environment, so you don’t accidently commit them to your source control repository. This feature is enabled in ASP.NET by default, and the framework does most of … Read more

C# – How to read configuration from appsettings.json

The appsettings.json file is a convenient way to store and retrieve your application’s configuration. You can add it to any project and then use the Microsoft.Extensions.Configuration library to work with it. Since appsettings.json is just a JSON file, you can add any section / values you want (this is easier than working with XML-based app.config … Read more