From 5b3c1961ef90a505e21d41ca6f908f74e3292ccf Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Sat, 6 Jun 2026 11:10:03 +0200 Subject: [PATCH 1/2] Removed version specification in docker compose file --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 98c5128..a589053 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.4' - services: litecharmssecurity.admin: image: skoruba-duende-identityserver-admin From 59920952c2449fe96c094c3fc02c1e1e7e15859b Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Sat, 6 Jun 2026 11:14:29 +0200 Subject: [PATCH 2/2] Added drift supression to Program.cs --- src/LiteCharmsSecurity.Admin.Api/Program.cs | 5 +++++ src/LiteCharmsSecurity.Admin.Api/Startup.cs | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/LiteCharmsSecurity.Admin.Api/Program.cs b/src/LiteCharmsSecurity.Admin.Api/Program.cs index ea59554..4cd43f9 100644 --- a/src/LiteCharmsSecurity.Admin.Api/Program.cs +++ b/src/LiteCharmsSecurity.Admin.Api/Program.cs @@ -24,6 +24,11 @@ namespace LiteCharmsSecurity.Admin.Api public static async Task Main(string[] args) { + // Force EF Core to globally ignore the Model Drift warning at the AppDomain level + AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue34300", true); + // OR if using standard diagnostics suppression: + System.Environment.SetEnvironmentVariable("EF_CORE_SUPPRESS_PENDING_MODEL_CHANGES_WARNING", "true"); + var configuration = GetConfiguration(args); Log.Logger = new LoggerConfiguration() diff --git a/src/LiteCharmsSecurity.Admin.Api/Startup.cs b/src/LiteCharmsSecurity.Admin.Api/Startup.cs index d66a694..15d6eca 100644 --- a/src/LiteCharmsSecurity.Admin.Api/Startup.cs +++ b/src/LiteCharmsSecurity.Admin.Api/Startup.cs @@ -111,13 +111,6 @@ namespace LiteCharmsSecurity.Admin.Api DatabaseMigrationsConfiguration databaseMigration) { services.AddDbContexts(Configuration, databaseMigration); - - // 2. Intercept the DbContextOptions configurations in the DI container and inject the ignore rule - services.Configure>(options => - options.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning))); - - services.Configure>(options => - options.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning))); } public virtual void RegisterAuthentication(IServiceCollection services)