Files
ChronoCCG/Chrono/Server/AppDbContextFactory.cs
T
2026-07-03 12:26:41 -04:00

16 lines
472 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace Server;
public class AppDbContextFactory : IDesignTimeDbContextFactory<AppDbContext>
{
public AppDbContext CreateDbContext(string[] args)
{
var options = new DbContextOptionsBuilder<AppDbContext>()
.UseNpgsql("Host=localhost;Database=chrono;Username=postgres;Password=postgres")
.Options;
return new AppDbContext(options);
}
}