mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
moved config to objectdb.
This commit is contained in:
parent
65061cdc96
commit
13658e3c6d
88 changed files with 627 additions and 586 deletions
27
NzbDrone.Core/Configuration/ConfigRepository.cs
Normal file
27
NzbDrone.Core/Configuration/ConfigRepository.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System.Linq;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
||||
namespace NzbDrone.Core.Configuration
|
||||
{
|
||||
public interface IConfigRepository : IBasicRepository<Config>
|
||||
{
|
||||
Config Get(string key);
|
||||
|
||||
}
|
||||
|
||||
public class ConfigRepository : BasicRepository<Config>, IConfigRepository
|
||||
{
|
||||
public ConfigRepository(IObjectDatabase objectDatabase)
|
||||
: base(objectDatabase)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public Config Get(string key)
|
||||
{
|
||||
return Queryable.SingleOrDefault(c => c.Key == key);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue