Added EF_CORE_SUPPRESS_PENDING_MODEL_CHANGES_WARNING

This commit is contained in:
Khwezi Mngoma
2026-06-06 10:25:03 +02:00
parent cf59d6dcc3
commit 742d556c03
3 changed files with 1 additions and 26 deletions
+1
View File
@@ -35,6 +35,7 @@ services:
ports: ports:
- "8082:8080" - "8082:8080"
environment: environment:
- EF_CORE_SUPPRESS_PENDING_MODEL_CHANGES_WARNING=true
- ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_ENVIRONMENT=Production
- ForwardedHeadersConfiguration__Enabled=true - ForwardedHeadersConfiguration__Enabled=true
- ForwardedHeadersConfiguration__AllowAll=true - ForwardedHeadersConfiguration__AllowAll=true
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts
{
public partial class AdminIdentityDbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
base.OnConfiguring(optionsBuilder);
// Globally prevents EF Core 9+ from throwing an exception when model snapshot drift occurs
optionsBuilder.ConfigureWarnings(warnings =>
warnings.Ignore(RelationalEventId.PendingModelChangesWarning));
}
}
}
@@ -5,14 +5,6 @@
<Description>DbContexts and Identity entities for the administration of the Duende IdentityServer and Asp.Net Core Identity</Description> <Description>DbContexts and Identity entities for the administration of the Duende IdentityServer and Asp.Net Core Identity</Description>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="DbContexts\AdminIdentityDbContext.Extension.cs" />
</ItemGroup>
<ItemGroup>
<None Include="DbContexts\AdminIdentityDbContext.Extension.cs" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" /> <PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />