mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
Updated PetaPoco with Exists, AddMany,UpdateMany,InsertMany,SaveMany
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user