I'm building a Repository in a class library that is separate from my Web API in order to maintain separation of concerns.
I want to store database configuration in my appsettings.json so that I can override these settings in Azure Web Apps. This provides me a path to have separate settings for local, pre-production, and production environments.
I'm assuming the best way to provide configuration settings to the repository is to read them from the Startup.cs and then pass them along to the class library.
What is the best way to store these settings to ensure they persist throughout the lifecycle of the application and ensure they don't get garbage collected?