Files
ChronoCCG/Chrono/DatabaseTest/AppDbContextFactory.cs
T
6d486f49 09a8adfc4a Test
2026-08-14 17:19:24 -04:00

15 lines
470 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace Cloud;
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);
}
}