Skip to content

Commit

Permalink
WIP: updating examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmwebb-lv committed Sep 12, 2024
1 parent 726941d commit 04121b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
var host = Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((context, builder) =>
{
ConfigurationContainer.Configuration = builder
.Build();
builder
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
ConfigurationContainer.Configuration = builder.Build();
})
.ConfigureServices(services =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (_configuration != null)
{
optionsBuilder.UseSqlServer(_configuration.GetConnectionString(@"TestDbContext"));
string connString = _configuration.GetConnectionString(@"TestDbContext");
optionsBuilder.UseSqlServer(connString);
optionsBuilder.UseLoggerFactory(EFUnitTestLoggingFactory)
.EnableSensitiveDataLogging();
}
Expand Down

0 comments on commit 04121b0

Please sign in to comment.