mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-29 02:57:15 +02:00
d514699ab7
Closes #977
24 lines
617 B
C#
24 lines
617 B
C#
using NzbDrone.Core.Datastore;
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
namespace NzbDrone.Core.Profiles
|
|
{
|
|
public interface IProfileRepository : IBasicRepository<Profile>
|
|
{
|
|
bool Exists(int id);
|
|
}
|
|
|
|
public class ProfileRepository : BasicRepository<Profile>, IProfileRepository
|
|
{
|
|
public ProfileRepository(IMainDatabase database, IEventAggregator eventAggregator)
|
|
: base(database, eventAggregator)
|
|
{
|
|
}
|
|
|
|
public bool Exists(int id)
|
|
{
|
|
return DataMapper.Query<Profile>().Where(p => p.Id == id).GetRowCount() == 1;
|
|
}
|
|
}
|
|
}
|