Files
hrynco-notification-service/HrynCo.NotificationService.DAL.EF/NotificationDbContextFactory.cs
T
agrynco 1631786ce2 feat(push): add service-owned firebase channels and delivery
Add push contracts, provider delivery and channel diagnostics. Link email channels to services and document migration and validation.

Ref: IT-1074
2026-10-24 12:31:35 +03:00

18 lines
657 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace HrynCo.NotificationService.DAL.EF;
internal sealed class NotificationDbContextFactory : IDesignTimeDbContextFactory<NotificationDbContext>
{
public NotificationDbContext CreateDbContext(string[] args)
{
var options = new DbContextOptionsBuilder<NotificationDbContext>()
.UseNpgsql(Environment.GetEnvironmentVariable("App__ConnectionString")
?? "Host=localhost;Port=5432;Database=notification_service;Username=postgres;Password=postgres")
.Options;
return new NotificationDbContext(options);
}
}