// appsettings.json "Position": { "Title": "Editor", "Name": "Joe Smith" }
// Program.csbuilder.Services.Configure<PositionOptions>(builder.Configuration.GetSection(PositionOptions.Position));
// Injecting it using DIpublic class FooController{ private readonly PositionOptions _options; public FooController(IOptions<PositionOptions> options) { _options = options.Value; }}