mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Switched to SQLCE 4.0
This commit is contained in:
parent
5b2111ff11
commit
69239bc371
33 changed files with 646 additions and 497 deletions
|
@ -278,7 +278,7 @@ namespace NzbDrone.Core.Providers.Core
|
|||
{
|
||||
string value;
|
||||
|
||||
var dbValue = _database.SingleOrDefault<Config>("WHERE Key=@0", key);
|
||||
var dbValue = _database.SingleOrDefault<Config>("WHERE [Key] =@0", key);
|
||||
|
||||
if (dbValue != null && !String.IsNullOrEmpty(dbValue.Value))
|
||||
return dbValue.Value;
|
||||
|
@ -308,7 +308,7 @@ namespace NzbDrone.Core.Providers.Core
|
|||
|
||||
Logger.Debug("Writing Setting to file. Key:'{0}' Value:'{1}'", key, value);
|
||||
|
||||
var dbValue = _database.SingleOrDefault<Config>("WHERE KEY=@0", key);
|
||||
var dbValue = _database.SingleOrDefault<Config>("WHERE [KEY]=@0", key);
|
||||
|
||||
if (dbValue == null)
|
||||
{
|
||||
|
@ -317,7 +317,11 @@ namespace NzbDrone.Core.Providers.Core
|
|||
else
|
||||
{
|
||||
dbValue.Value = value;
|
||||
_database.Update(dbValue);
|
||||
using (var tran = _database.GetTransaction())
|
||||
{
|
||||
_database.Update(dbValue);
|
||||
tran.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue