Skip to content

Commit

Permalink
add ConfigurationUi source at end of sources list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzliera committed Sep 16, 2021
1 parent 0ed38db commit 0a99c0a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ConfigurationUi/Extensions/HostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ public static IHostBuilder AddConfigurationUi<TConfigModel>(this IHostBuilder ho
var optionsBuilder = new ConfigurationUiOptionsBuilder();



hostBuilder.ConfigureAppConfiguration((_, builder) =>
{
optionsBuilder.UseJsonFileStorage(filePath, builder.GetFileProvider()).WithSchemeFromType<TConfigModel>();
builder.Sources.Insert(0, new JsonConfigurationSource() { Path = filePath });
builder.Sources.Add(new JsonConfigurationSource() { Path = filePath });
});

hostBuilder.ConfigureServices((_, services) =>
Expand Down

0 comments on commit 0a99c0a

Please sign in to comment.