mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
26 lines
807 B
C#
26 lines
807 B
C#
using System;
|
|
using System.Linq;
|
|
using NzbDrone.Core.Datastore;
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
namespace NzbDrone.Core.IndexerVersions
|
|
{
|
|
public interface IIndexerDefinitionVersionRepository : IBasicRepository<IndexerDefinitionVersion>
|
|
{
|
|
public IndexerDefinitionVersion GetByDefId(string defId);
|
|
}
|
|
|
|
public class IndexerDefinitionVersionRepository : BasicRepository<IndexerDefinitionVersion>, IIndexerDefinitionVersionRepository
|
|
{
|
|
public IndexerDefinitionVersionRepository(IMainDatabase database, IEventAggregator eventAggregator)
|
|
: base(database, eventAggregator)
|
|
{
|
|
}
|
|
|
|
public IndexerDefinitionVersion GetByDefId(string defId)
|
|
{
|
|
return Query(x => x.DefinitionId == defId).SingleOrDefault();
|
|
}
|
|
}
|
|
}
|