tgstation-server
6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Host
Database
Design
PostgresSqlDesignTimeDbContextFactory.cs
Go to the documentation of this file.
1
using
Microsoft.EntityFrameworkCore.Design;
2
3
using
Tgstation.Server.Common
;
4
using
Tgstation.Server.Host.Configuration
;
5
6
namespace
Tgstation.Server.Host.Database.Design
7
{
11
sealed
class
PostgresSqlDesignTimeDbContextFactory
:
IDesignTimeDbContextFactory
<PostgresSqlDatabaseContext>
12
{
14
public
PostgresSqlDatabaseContext
CreateDbContext
(
string
[] args)
15
=>
new
PostgresSqlDatabaseContext
(
16
DesignTimeDbContextFactoryHelpers
.CreateDatabaseContextOptions<
PostgresSqlDatabaseContext
>(
17
DatabaseType
.PostgresSql,
18
$
"Application Name={Constants.CanonicalPackageName};Host=127.0.0.1;Password=fake;Username=postgres;Database=TGS_Design"
));
19
}
20
}
IDesignTimeDbContextFactory
Tgstation.Server.Host.Database.Design.DesignTimeDbContextFactoryHelpers
Contains helpers for creating design time DatabaseContexts.
Definition
DesignTimeDbContextFactoryHelpers.cs:12
Tgstation.Server.Host.Database.Design.PostgresSqlDesignTimeDbContextFactory
IDesignTimeDbContextFactory<TContext> for creating PostgresSqlDatabaseContexts.
Definition
PostgresSqlDesignTimeDbContextFactory.cs:12
Tgstation.Server.Host.Database.Design.PostgresSqlDesignTimeDbContextFactory.CreateDbContext
PostgresSqlDatabaseContext CreateDbContext(string[] args)
Tgstation.Server.Host.Database.PostgresSqlDatabaseContext
DatabaseContext for PostgresSQL.
Definition
PostgresSqlDatabaseContext.cs:13
Tgstation.Server.Common
Definition
Constants.cs:2
Tgstation.Server.Host.Configuration
Definition
ControlPanelConfiguration.cs:4
Tgstation.Server.Host.Configuration.DatabaseType
DatabaseType
Type of database to user.
Definition
DatabaseType.cs:7
Tgstation.Server.Host.Database.Design
Definition
DesignTimeDbContextFactoryHelpers.cs:7
Generated by
1.9.8