1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-03-12 23:27:26 +00:00
Radarr/NzbDrone.Core/ExternalNotification/ExternalNotificationRepository.cs

24 lines
728 B
C#
Raw Normal View History

2013-03-23 21:16:00 -07:00
using System.Data;
2013-03-24 20:51:32 -07:00
using System.Linq;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.ExternalNotification
{
public interface IExternalNotificationRepository : IBasicRepository<ExternalNotificationDefinition>
{
ExternalNotificationDefinition Get(string name);
}
public class ExternalNotificationRepository : BasicRepository<ExternalNotificationDefinition>, IExternalNotificationRepository
{
2013-03-24 20:51:32 -07:00
public ExternalNotificationRepository(IDatabase database)
2013-03-23 21:16:00 -07:00
: base(database)
{
}
public ExternalNotificationDefinition Get(string name)
{
2013-03-26 20:44:52 -07:00
return Query.SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
}
}
}