With the release of ASP.NET Core, configuration was given a major upgrade. The new options API provides the ability to add configuration sections to the service provider and then inject them using the options interfaces. Unfortunately, I still see people injecting IConfiguration and then manually grabbing values with strings.
I’ve created a Nuget package for this called RequestInjector if you are interested in using what is discussed in this post. Source code for the package can be found here. These days, most people are familiar with dependency injection, and in the ASP.NET world, injecting into controllers. Less people probably are familiar with Jimmy Bogard’s […]