/// <summary> /// Configures the <see cref="DbContextOptions"/> used by the <see cref="DbContext"/>. /// </summary> /// <param name="options">Configuration options for <see cref="EFConfigurationProvider"/>.</param> /// <param name="configureAction">The <see cref="DbContextOptions"/> to use.</param> public static void ConfigureDbContext(this EFConfigurationOptions options, Action <DbContextOptionsBuilder> configureAction) { options.DbContextOptionsBuilder = configureAction; }
/// <summary> /// Builds the <see cref="IConfigurationProvider"/> for this source. /// </summary> /// <param name="builder">The <see cref="IConfigurationBuilder"/> to add to.</param> public IConfigurationProvider Build(IConfigurationBuilder builder) { var options = new EFConfigurationOptions(); _configureAction(options); return new EFConfigurationProvider(options.DbContextOptionsBuilder, options.ReloadInterval); }