Radarr/NzbDrone.Core/Indexers/NewznabRepository.cs

27 lines
643 B
C#
Raw Normal View History

2013-02-23 04:37:23 +00:00
using System;
using System.Collections.Generic;
2013-03-24 04:16:00 +00:00
using System.Data;
2013-02-23 04:37:23 +00:00
using System.Linq;
using System.Text;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.Indexers
{
public interface INewznabRepository : IBasicRepository<NewznabDefinition>
{
IEnumerable<NewznabDefinition> Enabled();
}
public class NewznabRepository : BasicRepository<NewznabDefinition>, INewznabRepository
{
2013-03-25 03:51:32 +00:00
public NewznabRepository(IDatabase database) : base(database)
2013-02-23 04:37:23 +00:00
{
}
public IEnumerable<NewznabDefinition> Enabled()
{
2013-03-25 03:51:32 +00:00
return Queryable().Where(n => n.Enabled);
2013-02-23 04:37:23 +00:00
}
}
}