I want a simple static class that accesses the Configuration object. All the config info is already read in from the appsettings.json file in the Startup class. I just need an e
I think you could use extension function, something like this
public static string ConfigToSomeThing(this IConfiguration config, int value) { return config[value.ToString()] ?? ""; }
Then any place , just injection IConfiguration and use extension method
_systemConfiguration.ConfigToSomeThing(123);