mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
Playing around with db factories.
This commit is contained in:
parent
c6716f2425
commit
974dfa319b
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Data.Common;
|
||||
using System.Data.EntityClient;
|
||||
using System.Data.SqlServerCe;
|
||||
@ -13,6 +14,17 @@ public class Connection
|
||||
{
|
||||
private readonly EnviromentProvider _enviromentProvider;
|
||||
|
||||
|
||||
public static void InitiFacotry()
|
||||
{
|
||||
|
||||
var dataSet = ConfigurationManager.GetSection("system.data") as System.Data.DataSet;
|
||||
dataSet.Tables[0].Rows.Add("Microsoft SQL Server Compact Data Provider 4.0"
|
||||
, "System.Data.SqlServerCe.4.0"
|
||||
, ".NET Framework Data Provider for Microsoft SQL Server Compact"
|
||||
, "System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91");
|
||||
}
|
||||
|
||||
public Connection(EnviromentProvider enviromentProvider)
|
||||
{
|
||||
_enviromentProvider = enviromentProvider;
|
||||
@ -21,6 +33,7 @@ public Connection(EnviromentProvider enviromentProvider)
|
||||
static Connection()
|
||||
{
|
||||
Database.Mapper = new CustomeMapper();
|
||||
InitiFacotry();
|
||||
}
|
||||
|
||||
public String MainConnectionString
|
||||
|
Loading…
Reference in New Issue
Block a user