1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 10:32:35 +01:00
Radarr/NzbDrone.Core/Datastore/PetaDbProviderFactory.cs
Mark McDowall 0b586de226 Added misnamed provider, PLINQ speeds it up, but still to slow for use, paging helps, but isn't consistent.
A bunch of files changed removing System.Linq, thanks Resharper :(
2011-09-03 20:05:44 -07:00

28 lines
659 B
C#

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;
}
}
}