diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 1e6a0d62d3..0f347f1d08 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -154,15 +154,13 @@ namespace Tgstation.Server.Host.Core var databaseConfiguration = databaseConfigurationSection.Get(); - void ConfigureDatabase(DbContextOptionsBuilder builder) - { - if (hostingEnvironment.IsDevelopment()) - builder.EnableSensitiveDataLogging(); - }; - void AddTypedContext() where TContext : DatabaseContext { - services.AddDbContext(ConfigureDatabase); + services.AddDbContext(builder => + { + if (hostingEnvironment.IsDevelopment()) + builder.EnableSensitiveDataLogging(); + }); services.AddScoped(x => x.GetRequiredService()); }