1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-17 10:45:49 +02:00
Sonarr/NzbDrone.Core/ExternalNotification/ExternalNotificationRepository.cs

23 lines
707 B
C#
Raw Normal View History

2013-03-23 21:16:00 -07:00
using System.Data;
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-23 21:16:00 -07:00
public ExternalNotificationRepository(IDbConnection database)
: base(database)
{
}
public ExternalNotificationDefinition Get(string name)
{
2013-03-23 21:16:00 -07:00
return SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
}
}
}