1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-29 02:55:38 +00:00
Lidarr/NzbDrone.Core/ExternalNotification/ExternalNotificationRepository.cs
2013-03-25 23:19:51 -07:00

23 lines
No EOL
707 B
C#

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