Asp.net core provides configuration abstractions. They allow you to load configuration settings from various sources and build a final configuration model which can then be consumed by your application.
IConfigurationstring this[string key] { get; set; }IEnumerable<IConfigurationSection> GetChildren();IConfigurationSection GetSection(string key);