Created
April 18, 2021 13:39
-
-
Save manoj-choudhari-git/a6f311a31475046b4e315fd5c12ecb4b to your computer and use it in GitHub Desktop.
Custom configuration provider extensions to build the configuration object using the custom configuration source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.Configuration; | |
namespace CustomConfigProviderExample.CustomConfigProvider | |
{ | |
public static class CustomConfigProviderExtensions | |
{ | |
public static IConfigurationBuilder AddCustomDatabaseConfiguration( | |
this IConfigurationBuilder builder, Action<DbContextOptionsBuilder> optionsAction) | |
{ | |
return builder.Add(new CustomConfigurationSource(optionsAction)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment