I am trying to load my app settings with ASP.NET Core Options pattern.
The appsettings.json contains:
{
"TEst": "hello",
"TEST_ABC": "2"
}
POCO class:
public class AppSetting
{
public string Test { get; set; }
public string TestAbc { get; set; }
}
Bind to configuration:
services.Configure<AppSetting>(Configuration);
While access AppSetting instance in controller, I can only get config Test as hello. TestAbc is set to null.
It seems Options pattern couldn't convert this kind of naming configuration, is it possible by any other means to achieve this?
Test_Abc?TestAbcandTEST_ABCAre two different names, they have to match[JsonProperty("TEST_ABC")]attribute for example.