/// <inheritdoc />
 public SqliteDatabaseContext CreateDbContext(string[] args)
 {
     SqliteDatabaseContext.DesignTime = true;
     return(new SqliteDatabaseContext(
                DesignTimeDbContextFactoryHelpers.CreateDatabaseContextOptions <SqliteDatabaseContext>(
                    DatabaseType.Sqlite,
                    "Data Source=tgs_design.sqlite3;Mode=ReadWriteCreate")));
 }
 /// <inheritdoc />
 public SqlServerDatabaseContext CreateDbContext(string[] args)
 {
     using (var loggerFactory = new LoggerFactory())
     {
         return(new SqlServerDatabaseContext(
                    new DbContextOptions <SqlServerDatabaseContext>(),
                    DesignTimeDbContextFactoryHelpers.GetDbContextOptions(),
                    new DatabaseSeeder(
                        new CryptographySuite(
                            new PasswordHasher <User>())),
                    loggerFactory.CreateLogger <SqlServerDatabaseContext>()));
     }
 }
 /// <inheritdoc />
 public SqlServerDatabaseContext CreateDbContext(string[] args)
 {
     using var loggerFactory = new LoggerFactory();
     return(new SqlServerDatabaseContext(
                new DbContextOptions <SqlServerDatabaseContext>(),
                DesignTimeDbContextFactoryHelpers.GetDatabaseConfiguration(
                    DatabaseType.SqlServer,
                    "Data Source=fake;Initial Catalog=TGS_Design;Integrated Security=True;Application Name=tgstation-server"),
                new DatabaseSeeder(
                    new CryptographySuite(
                        new PasswordHasher <User>()),
                    new PlatformIdentifier()),
                loggerFactory.CreateLogger <SqlServerDatabaseContext>()));
 }
		/// <inheritdoc />
		public SqliteDatabaseContext CreateDbContext(string[] args)
		{
			using var loggerFactory = new LoggerFactory();
			return new SqliteDatabaseContext(
				new DbContextOptions<SqliteDatabaseContext>(),
				DesignTimeDbContextFactoryHelpers.GetDatabaseConfiguration(
					DatabaseType.Sqlite,
					"Data Source=tgs_design.sqlite3;Mode=ReadWriteCreate"),
				new DatabaseSeeder(
				new CryptographySuite(
				new PasswordHasher<User>()),
				new PlatformIdentifier()),
				loggerFactory.CreateLogger<SqliteDatabaseContext>());
		}
예제 #5
0
 /// <inheritdoc />
 public PostgresSqlDatabaseContext CreateDbContext(string[] args)
 {
     using var loggerFactory = new LoggerFactory();
     return(new PostgresSqlDatabaseContext(
                new DbContextOptions <PostgresSqlDatabaseContext>(),
                DesignTimeDbContextFactoryHelpers.GetDatabaseConfiguration(
                    DatabaseType.PostgresSql,
                    "Application Name=tgstation-server;Host=127.0.0.1;Password=qCkWimNgLfWwpr7TnUHs;Username=postgres;Database=TGS_Design"),
                new DatabaseSeeder(
                    new CryptographySuite(
                        new PasswordHasher <User>()),
                    new PlatformIdentifier()),
                loggerFactory.CreateLogger <PostgresSqlDatabaseContext>()));
 }
예제 #6
0
 /// <inheritdoc />
 public MySqlDatabaseContext CreateDbContext(string[] args)
 {
     using var loggerFactory = new LoggerFactory();
     return(new MySqlDatabaseContext(
                new DbContextOptions <MySqlDatabaseContext>(),
                DesignTimeDbContextFactoryHelpers.GetDatabaseConfiguration(
                    DatabaseType.MariaDB,
                    "Server=127.0.0.1;User Id=root;Password=fake;Database=TGS_Design"),
                new DatabaseSeeder(
                    new CryptographySuite(
                        new PasswordHasher <User>()),
                    new PlatformIdentifier()),
                loggerFactory.CreateLogger <MySqlDatabaseContext>()));
 }
 /// <inheritdoc />
 public SqlServerDatabaseContext CreateDbContext(string[] args)
 => new SqlServerDatabaseContext(
     DesignTimeDbContextFactoryHelpers.CreateDatabaseContextOptions <SqlServerDatabaseContext>(
         DatabaseType.SqlServer,
         "Data Source=fake;Initial Catalog=TGS_Design;Integrated Security=True;Application Name=tgstation-server"));
예제 #8
0
 /// <inheritdoc />
 public PostgresSqlDatabaseContext CreateDbContext(string[] args)
 => new PostgresSqlDatabaseContext(
     DesignTimeDbContextFactoryHelpers.CreateDatabaseContextOptions <PostgresSqlDatabaseContext>(
         DatabaseType.PostgresSql,
         "Application Name=tgstation-server;Host=127.0.0.1;Password=fake;Username=postgres;Database=TGS_Design"));
 /// <inheritdoc />
 public MySqlDatabaseContext CreateDbContext(string[] args)
 => new MySqlDatabaseContext(
     DesignTimeDbContextFactoryHelpers.CreateDatabaseContextOptions <MySqlDatabaseContext>(
         DatabaseType.MariaDB,
         "Server=127.0.0.1;User Id=root;Password=fake;Database=TGS_Design"));