mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
f8be43a486
Updated to latest WebActivator.
28 lines
704 B
C#
28 lines
704 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.Common;
|
|
using System.Data.SqlServerCe;
|
|
using System.Text;
|
|
using MvcMiniProfiler;
|
|
using MvcMiniProfiler.Data;
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
{
|
|
class PetaDbProviderFactory : DbProviderFactory
|
|
{
|
|
public Boolean IsProfiled { get; set; }
|
|
|
|
public override DbConnection CreateConnection()
|
|
{
|
|
var sqliteConnection = new SqlCeConnection();
|
|
DbConnection connection = sqliteConnection;
|
|
|
|
if (IsProfiled)
|
|
{
|
|
connection = new ProfiledDbConnection(sqliteConnection, MiniProfiler.Current);
|
|
}
|
|
|
|
return connection;
|
|
}
|
|
}
|
|
}
|