ASP.NET IOptions pattern example

IOptions<T> gives us compile-time safety and eliminates magic strings.
Simple example below :

Click on the image for a larger view in a new window.

Code for the sample above as well as the IConfiguration alternative is available on my GitHub Gist.

Leave a Reply

Your email address will not be published. Required fields are marked *