You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/NzbDrone.Core/Datastore/PetaDbProviderFactory.cs

28 lines
659 B

using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlServerCe;
using System.Text;
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 = ProfiledDbConnection.Get(sqliteConnection);
}
return connection;
}
}
}