1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00
Radarr/NzbDrone.Core/ExternalNotification/ExternalNotificationRepository.cs
2013-03-26 20:44:52 -07:00

24 lines
728 B
C#

using System.Data;
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
{
public ExternalNotificationRepository(IDatabase database)
: base(database)
{
}
public ExternalNotificationDefinition Get(string name)
{
return Query.SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
}
}
}