2019-02-23 22:39:11 +00:00
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Profiles.Qualities
|
|
|
|
{
|
|
|
|
public interface IProfileRepository : IBasicRepository<QualityProfile>
|
|
|
|
{
|
|
|
|
bool Exists(int id);
|
|
|
|
}
|
|
|
|
|
|
|
|
public class QualityProfileRepository : BasicRepository<QualityProfile>, IProfileRepository
|
|
|
|
{
|
|
|
|
public QualityProfileRepository(IMainDatabase database, IEventAggregator eventAggregator)
|
|
|
|
: base(database, eventAggregator)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool Exists(int id)
|
|
|
|
{
|
2020-08-18 20:11:44 +00:00
|
|
|
return Query(p => p.Id == id).Count == 1;
|
2019-02-23 22:39:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|