mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Added MiniProfiler
This commit is contained in:
parent
add780b431
commit
6355d5ada1
16 changed files with 6676 additions and 23 deletions
|
@ -1,9 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using MvcMiniProfiler.Data;
|
||||
using SubSonic.DataProviders;
|
||||
using SubSonic.DataProviders.SQLite;
|
||||
using SubSonic.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Datastore
|
||||
|
@ -41,7 +40,7 @@ namespace NzbDrone.Core.Datastore
|
|||
|
||||
public static IDataProvider GetDataProvider(string connectionString)
|
||||
{
|
||||
return ProviderFactory.GetProvider(connectionString, "System.Data.SQLite");
|
||||
return new ProfiledSQLiteProvider(connectionString, "System.Data.SQLite");
|
||||
}
|
||||
|
||||
public static IRepository CreateSimpleRepository(IDataProvider dataProvider)
|
||||
|
@ -55,4 +54,19 @@ namespace NzbDrone.Core.Datastore
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ProfiledSQLiteProvider : SQLiteProvider
|
||||
{
|
||||
public ProfiledSQLiteProvider(string connectionString, string providerName)
|
||||
: base(connectionString, providerName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override System.Data.Common.DbConnection CreateConnection(string connectionString)
|
||||
{
|
||||
return ProfiledDbConnection.Get(base.CreateConnection(connectionString));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue