chore(api): update Program.cs to use new infrastructure builder API

- Update using directive to new DependencyInjection namespace
- Pass builder delegate to AddInfrastructure() calling
  cfg.AddRabbitMqConnectionFactory(builder.Configuration)
This commit is contained in:
2026-11-02 15:02:36 +01:00
parent 14cf8e8821
commit 376a22580b

View File

@@ -1,5 +1,5 @@
using DigitalData.MessagingService.API.Middleware;
using DigitalData.MessagingService.Application;
using DigitalData.MessagingService.Application.DependencyInjection;
using DigitalData.MessagingService.Infrastructure;
using DigitalData.MessagingService.Infrastructure.Services.Background;
using HealthChecks.UI.Client;
@@ -68,7 +68,7 @@ try
builder.Services.AddMessagingServiceApplication(builder.Configuration);
// Register Infrastructure layer (RabbitMQ, Repositories, etc.)
builder.Services.AddInfrastructure(builder.Configuration);
builder.Services.AddInfrastructure(cfg => cfg.AddRabbitMqConnectionFactory(builder.Configuration));
// Health checks — each check corresponds to a singleton registered in the Infrastructure layer
builder.Services.AddHealthChecks()