using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; // ReSharper disable UnusedType.Global namespace Content.Server.Database; public sealed class DesignTimeContextFactoryPostgres : IDesignTimeDbContextFactory { public PostgresServerDbContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseNpgsql(args[0]); return new PostgresServerDbContext(optionsBuilder.Options); } } public sealed class DesignTimeContextFactorySqlite : IDesignTimeDbContextFactory { public SqliteServerDbContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseSqlite(args[0]); return new SqliteServerDbContext(optionsBuilder.Options); } }