1
0
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:
kay.one 2011-11-22 22:15:02 -08:00
parent c6716f2425
commit 974dfa319b

View File

@ -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