mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
Misc definition handling improvements
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user