1631786ce2
Add push contracts, provider delivery and channel diagnostics. Link email channels to services and document migration and validation. Ref: IT-1074
18 lines
657 B
C#
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);
|
|
}
|
|
}
|