You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/NzbDrone.Core/Indexers/IndexerRepository.cs

28 lines
639 B

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