Friday, April 13, 2018

dotnet core set static value in library using config

I want to set a value in a dotnet core class library using environment configuration.

I am able to do this in the .net framework: ConfigurationManager.AppSettings["MyKey"]

But everything I can find for dotnet core directs me towards using dependency injection.
There is also an example where you can set the values in the static constructor - but how can I do that and access it from my library?

Thanks

dotnet core set static value in library using config Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team