Dictionary-style settings as IOptions
I love how we can use appsettings.json files to configure applications in the .NET Core platform. The JSON-format feels a lot less bloated than the old XML appSettings config I used to work with. In this blog I’ll explore how to load a dictionary-style settings class as an IOption. This can be very useful when working with dependency injection.
Setup multiple setting-files with a .NET Console Application
In ASP.NET Core we are used to have multiple appsettings.json files with settings that differ per environment. I want to do the same in a Console Application. This makes debugging the application easier.
Dependency injection (with IOptions) in Console Apps in .NET Core 2
When you are used to building web applications, you kind of get hooked to the ease of Dependency Injection (DI) and the way settings can be specified in a JSON file and accessed through DI (IOptions
About the Author
Hi! I'm Kees. Thanks for checking out my Blog. I work as a .Net Engineer for one of the biggest web-shops in the Netherlands: wehkamp. I ❤️ C# and I like to solve nifty problems.Learn more