1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-07-13 01:20:22 +02:00
Files
Sonarr/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());
}
}
}