diff --git a/src/Argon.Api/Program.cs b/src/Argon.Api/Program.cs index 60e5217..9000d23 100644 --- a/src/Argon.Api/Program.cs +++ b/src/Argon.Api/Program.cs @@ -27,16 +27,9 @@ builder.AddServiceDefaults(); builder.AddRedisOutputCache("cache"); builder.AddRedisClient("cache"); - -if (builder.Environment.IsManaged()) - builder.AddNpgsqlDbContext("DefaultConnection", null, - x => x.AddInterceptors([new TimeStampAndSoftDeleteInterceptor()])); -else - builder.Services.AddDbContext(x => x - .EnableDetailedErrors() - .EnableSensitiveDataLogging() - .UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")) - .AddInterceptors([new TimeStampAndSoftDeleteInterceptor()])); +builder.Services.AddDbContext(x => x + .EnableDetailedErrors().EnableSensitiveDataLogging().UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")) + .AddInterceptors(new TimeStampAndSoftDeleteInterceptor())); builder.Services.AddSingleton(); builder.Services.AddHttpContextAccessor();