added Marr.Data.Mapping

This commit is contained in:
kay.one 2013-03-24 20:51:32 -07:00
commit 6dd56114e3
29 changed files with 208 additions and 229 deletions

View file

@ -1,11 +1,9 @@
using NzbDrone.Core.Datastore;
using ServiceStack.DataAnnotations;
namespace NzbDrone.Core.Configuration
{
public class Config : ModelBase
{
[Index(Unique = true)]
public string Key { get; set; }
public string Value { get; set; }
}

View file

@ -12,7 +12,7 @@ namespace NzbDrone.Core.Configuration
public class ConfigRepository : BasicRepository<Config>, IConfigRepository
{
public ConfigRepository(IDbConnection database)
public ConfigRepository(IDatabase database)
: base(database)
{
}
@ -20,7 +20,7 @@ namespace NzbDrone.Core.Configuration
public Config Get(string key)
{
return SingleOrDefault(c => c.Key == key);
return Queryable().SingleOrDefault(c => c.Key == key);
}