using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; namespace TransmissionRssManager.Data { // This class is used by Entity Framework Core tools to create migrations public class TorrentManagerContextFactory : IDesignTimeDbContextFactory { public TorrentManagerContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseNpgsql("Host=localhost;Database=torrentmanager;Username=postgres;Password=postgres"); return new TorrentManagerContext(optionsBuilder.Options); } } }