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.
IConfiguration
string this[string key] { get; set; }
IEnumerable<IConfigurationSection> GetChildren();
IConfigurationSection GetSection(string key);