Options Pattern in Asp Net Core: Easier than you think!

Siarhei Kharlap
10 min readSep 3, 2023
Photo by Sigmund on Unsplash

I don’t think I need to mention that the Options Pattern has become the source of truth when it comes to distributing configurations across the system.
While it may seem overcomplicated and overwhelming at first glance, it is still very useful

The very thing I’m going to mention in this story can be found in the original documentation, but I’ll present it in a more human-readable way:

When I consider options as configurations, for me, it naturally implies having the capability to establish, validate, and utilize them. Just like when we talk about your smartphone configurations; you can configure the volume, and during the configuration, it can be validated (for example, if you’ve restricted the maximum volume while using earbuds, it may not allow you to increase it further). Then these configurations are applied to the system, effectively increasing the sound volume.
So let’s go through each of these steps.

Establish / Set up / Configure

--

--