2018-05-09 18:51:53 +02:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace Geekbot.net.Database
|
|
|
|
|
{
|
|
|
|
|
public class SqlDatabase : DatabaseContext
|
|
|
|
|
{
|
|
|
|
|
private readonly SqlConnectionString _connectionString;
|
|
|
|
|
|
|
|
|
|
public SqlDatabase(SqlConnectionString connectionString)
|
|
|
|
|
{
|
|
|
|
|
_connectionString = connectionString;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
2018-05-10 00:00:51 +02:00
|
|
|
|
=> optionsBuilder.UseNpgsql(_connectionString.ToString());
|
2018-05-09 18:51:53 +02:00
|
|
|
|
}
|
|
|
|
|
}
|