.NET 6 typed appSettings

From this page

Inject IConfiguration into controller

_configuration.GetValue<int>("MySettingNumberOfDays");