From fa4f6e5ecc2e0057fe205dc9eb10ab3972f5ec69 Mon Sep 17 00:00:00 2001 From: Ayan Poddar Date: Wed, 2 Jul 2025 16:58:59 +0530 Subject: [PATCH] update the release --- .../Infrastructure/EnviromentLoader.cs | 3 --- src/Acme.BookStore.HttpApi.Host/Program.cs | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Acme.BookStore.HttpApi.Host/Infrastructure/EnviromentLoader.cs b/src/Acme.BookStore.HttpApi.Host/Infrastructure/EnviromentLoader.cs index f8159be..dcd5297 100644 --- a/src/Acme.BookStore.HttpApi.Host/Infrastructure/EnviromentLoader.cs +++ b/src/Acme.BookStore.HttpApi.Host/Infrastructure/EnviromentLoader.cs @@ -16,9 +16,6 @@ public static class EnviromentLoader { public static async Task SetDatabaseEnviroment([NotNull] this WebApplicationBuilder builder) { - if (!builder.Environment.IsProduction()) - return; - var connectionSection = builder.Configuration.GetSection("ConnectionStrings"); var connections = connectionSection.GetChildren(); var sb = new StringBuilder(); diff --git a/src/Acme.BookStore.HttpApi.Host/Program.cs b/src/Acme.BookStore.HttpApi.Host/Program.cs index 8c3d88a..ae55fea 100644 --- a/src/Acme.BookStore.HttpApi.Host/Program.cs +++ b/src/Acme.BookStore.HttpApi.Host/Program.cs @@ -40,7 +40,9 @@ public class Program .WriteTo.Async(c => c.Console()) .WriteTo.Async(c => c.AbpStudio(services)); }); +#if RELEASE await builder.SetDatabaseEnviroment(); +#endif await builder.AddApplicationAsync(); var app = builder.Build(); await app.InitializeApplicationAsync();