using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace CalledIt.DataAccess;

public class CalledItDbContextFactory : IDesignTimeDbContextFactory<CalledItDbContext>
{
    public CalledItDbContext CreateDbContext(string[] args)
    {
        var optionsBuilder = new DbContextOptionsBuilder<CalledItDbContext>();
        optionsBuilder.UseNpgsql("Host=localhost;Database=calledit;Username=postgres;Password=postgres");
        return new CalledItDbContext(optionsBuilder.Options);
    }
}
