mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Updated PetaPoco with Exists, AddMany,UpdateMany,InsertMany,SaveMany
This commit is contained in:
parent
3cccb5858a
commit
dd55a055e6
2 changed files with 137 additions and 27 deletions
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SQLite;
|
||||
using System.IO;
|
||||
using MvcMiniProfiler.Data;
|
||||
|
@ -58,9 +60,12 @@ namespace NzbDrone.Core.Datastore
|
|||
public static IDatabase GetPetaPocoDb(string connectionString)
|
||||
{
|
||||
var profileConnection = ProfiledDbConnection.Get(new SQLiteConnection(connectionString));
|
||||
PetaPoco.Database.Mapper = new CustomeMapper();
|
||||
var db = new PetaPoco.Database(profileConnection);
|
||||
db.OpenSharedConnection();
|
||||
|
||||
Database.Mapper = new CustomeMapper();
|
||||
var db = new Database(profileConnection);
|
||||
|
||||
if (profileConnection.State != ConnectionState.Open)
|
||||
profileConnection.Open();
|
||||
|
||||
return db;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue