Tutorial by Examples

Add this text to appsettings.json { "key1": "value1", "key2": 2, "subsectionKey": { "suboption1": "subvalue1" } } Now you can use this configuration in your app, in the way like this public class Program { sta...
Create class like a class below public class MyOptions { public MyOptions() { // Set default value, if you need it. Key1 = "value1_from_ctor"; } public string Key1 { get; set; } public int Key2 { get; set; } } Then you need to add this code ...

Page 1 of 1