Log page now uses EF for faster runtime queries.

This commit is contained in:
kay.one 2011-11-22 21:58:26 -08:00
commit c6716f2425
49 changed files with 14898 additions and 555 deletions

View file

@ -0,0 +1,26 @@
using System;
using System.Data.Common;
using System.Data.SqlServerCe;
using MvcMiniProfiler;
using MvcMiniProfiler.Data;
namespace NzbDrone.Core.Datastore
{
class DbProviderFactory : System.Data.Common.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;
}
}
}