tgstation-server
6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Host
Database
Design
SqliteDesignTimeDbContextFactory.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
SqliteDesignTimeDbContextFactory
:
IDesignTimeDbContextFactory
<SqliteDatabaseContext>
11
{
13
public
SqliteDatabaseContext
CreateDbContext
(
string
[] args)
14
{
15
return
new
SqliteDatabaseContext
(
16
DesignTimeDbContextFactoryHelpers
.CreateDatabaseContextOptions<
SqliteDatabaseContext
>(
17
DatabaseType
.Sqlite,
18
"Data Source=tgs_design.sqlite3;Mode=ReadWriteCreate"
),
19
true
);
20
}
21
}
22
}
IDesignTimeDbContextFactory
Tgstation.Server.Host.Database.Design.DesignTimeDbContextFactoryHelpers
Contains helpers for creating design time DatabaseContexts.
Definition
DesignTimeDbContextFactoryHelpers.cs:12
Tgstation.Server.Host.Database.Design.SqliteDesignTimeDbContextFactory
IDesignTimeDbContextFactory<TContext> for creating SqliteDatabaseContexts.
Definition
SqliteDesignTimeDbContextFactory.cs:11
Tgstation.Server.Host.Database.Design.SqliteDesignTimeDbContextFactory.CreateDbContext
SqliteDatabaseContext CreateDbContext(string[] args)
Definition
SqliteDesignTimeDbContextFactory.cs:13
Tgstation.Server.Host.Database.SqliteDatabaseContext
DatabaseContext for SQLite.
Definition
SqliteDatabaseContext.cs:15
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