1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00
Radarr/NzbDrone.Core/Indexers/IndexerRepository.cs
2013-03-25 23:19:55 -07:00

26 lines
565 B
C#

using System;
using System.Data;
using System.Linq;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.Indexers
{
public interface IIndexerRepository : IBasicRepository<Indexer>
{
Indexer Find(Type type);
}
public class IndexerRepository : BasicRepository<Indexer>, IIndexerRepository
{
public IndexerRepository(IDatabase database)
: base(database)
{
}
public Indexer Find(Type type)
{
return Queryable().Single(i => i.Type == type.ToString());
}
}
}