Search code examples
asp.net-coremicrosoft.extensions.configuration

ASP.NET Core ConfigurationProvider from database


I wonder if there is implemented ConfigurationProvider for ASP.NET Core which loads options from Database. EF or Dapper. It's fairly easy to implement ourselves, but I wonder if there is ready solution, and if this really a good idea.


Solution

  • According to your description, I suggest you could try to use EfConfigurationProvider, you could directly use by installing through nuget package.

    Install-Package EfConfigurationProvider -Version 0.2.1
    

    More details about how to use it ,you could refer to this article.

    If this doesn't match your requirement, I suggest you could create the custom provider by yourself, like this blog shows.