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.
Prowlarr/NzbDrone.Core/Indexers/IndexerRepository.cs

26 lines
565 B

using System;
12 years ago
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)
12 years ago
: base(database)
{
}
public Indexer Find(Type type)
{
return Queryable().Single(i => i.Type == type.ToString());
}
}
}