mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-01 00:12:30 +01:00
26 lines
559 B
C#
26 lines
559 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 Query.Single(i => i.Type == type.ToString());
|
|
}
|
|
}
|
|
}
|