Month: December 2023

Eager validation – Options, Settings, and Configuration

Eager validation has been added to .NET 6 and allows catching incorrectly configured options at startup time in a fail-fast mindset.The Microsoft.Extensions.Hosting assembly adds the ValidateOnStart extension method to the OptionsBuilder<TOptions> type.There are different ways of using this, including the following, which binds a configuration section to an options class: services.AddOptions<Options>()    .Configure(o => /* Omitted […]



         


          Terms of Use | Accessibility Privacy