configuration section
A named group of related settings, such as the Catalog object in appsettings.json, that binds to one options class.
In more detail
Sections can nest, and a key path such as Catalog:MaxPageSize names a value inside one. Keeping the section name as a constant on the options class avoids retyping the string at every registration and test.
Related terms
- IConfiguration — The .NET interface for reading configuration, a merged set of key-value strings from settings files, environment variables and other providers.
- options pattern — Binding a configuration section to a plain class with typed properties, validating it, and injecting it into services instead of reading raw strings.
- appsettings.json — The JSON settings file an ASP.NET Core app reads at startup, where each object is a configuration section.
Taught in
- The Options Pattern: Strongly Typed Configuration — Modern .NET Core, C# & Enterprise Microservices
- Environment Layering and User Secrets — Modern .NET Core, C# & Enterprise Microservices