Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/a6f311a31475046b4e315fd5c12ecb4b to your computer and use it in GitHub Desktop.
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
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