tgstation-server
6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Host
Database
Design
SqlServerDesignTimeDbContextFactory.cs
Go to the documentation of this file.
1
using
Microsoft.EntityFrameworkCore.Design;
2
3
using
Tgstation.Server.Host.Configuration
;
4
5
namespace
Tgstation.Server.Host.Database.Design
6
{
10
sealed
class
SqlServerDesignTimeDbContextFactory
:
IDesignTimeDbContextFactory
<SqlServerDatabaseContext>
11
{
13
public
SqlServerDatabaseContext
CreateDbContext
(
string
[] args)
14
=>
new
SqlServerDatabaseContext
(
15
DesignTimeDbContextFactoryHelpers
.CreateDatabaseContextOptions<
SqlServerDatabaseContext
>(
16
DatabaseType
.SqlServer,
17
"Data Source=fake;Initial Catalog=TGS_Design;Integrated Security=True;Encrypt=false;Application Name=tgstation-server"
));
18
}
19
}
IDesignTimeDbContextFactory
Tgstation.Server.Host.Database.Design.DesignTimeDbContextFactoryHelpers
Contains helpers for creating design time DatabaseContexts.
Definition
DesignTimeDbContextFactoryHelpers.cs:12
Tgstation.Server.Host.Database.Design.SqlServerDesignTimeDbContextFactory
IDesignTimeDbContextFactory<TContext> for creating SqlServerDatabaseContexts.
Definition
SqlServerDesignTimeDbContextFactory.cs:11
Tgstation.Server.Host.Database.Design.SqlServerDesignTimeDbContextFactory.CreateDbContext
SqlServerDatabaseContext CreateDbContext(string[] args)
Tgstation.Server.Host.Database.SqlServerDatabaseContext
DatabaseContext for Sqlserver.
Definition
SqlServerDatabaseContext.cs:13
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