From f99bd8c3994021ac6354e6455eb6f9652a850ede Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 13 Aug 2026 16:49:10 +0200 Subject: [PATCH] fix(infrastructure): change IImapEmailService registration from Singleton to Scoped to support scoped DbContext dependency --- .../DependencyInjection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/DigitalData.MessagingService.Infrastructure/DependencyInjection.cs b/src/infrastructure/DigitalData.MessagingService.Infrastructure/DependencyInjection.cs index d1444cc..2a7ebf6 100644 --- a/src/infrastructure/DigitalData.MessagingService.Infrastructure/DependencyInjection.cs +++ b/src/infrastructure/DigitalData.MessagingService.Infrastructure/DependencyInjection.cs @@ -34,7 +34,7 @@ public static class DependencyInjection // Email Service - IMAP inbound (Limilabs Mail.dll) // Fresh connection per call — stateless and thread-safe. - services.AddSingleton(); + services.AddScoped(); // PDF Processing Service (using DevExpress.Pdf) services.AddScoped();