using System.Linq; using NzbDrone.Core.Datastore; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.ThingiProvider; namespace NzbDrone.Core.Indexers { public interface IIndexerStatusRepository : IProviderRepository { IndexerStatus FindByIndexerId(int indexerId); } public class IndexerStatusRepository : ProviderRepository, IIndexerStatusRepository { public IndexerStatusRepository(IMainDatabase database, IEventAggregator eventAggregator) : base(database, eventAggregator) { } public IndexerStatus FindByIndexerId(int indexerId) { return Query.Where(c => c.IndexerId == indexerId).SingleOrDefault(); } } }