1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-30 19:45:57 +00:00
Lidarr/NzbDrone.Core/ExternalNotification/ExternalNotificationRepository.cs

24 lines
728 B
C#
Raw Normal View History

2013-03-24 04:16:00 +00:00
using System.Data;
2013-03-25 03:51:32 +00: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-25 03:51:32 +00:00
public ExternalNotificationRepository(IDatabase database)
2013-03-24 04:16:00 +00:00
: base(database)
{
}
public ExternalNotificationDefinition Get(string name)
{
2013-03-27 03:44:52 +00:00
return Query.SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
}
}
}