mirror of
https://github.com/Radarr/Radarr
synced 2024-12-28 02:40:01 +00:00
25 lines
No EOL
810 B
C#
25 lines
No EOL
810 B
C#
using System.Data;
|
|
using System.Linq;
|
|
using NzbDrone.Common.Messaging;
|
|
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, IMessageAggregator messageAggregator)
|
|
: base(database, messageAggregator)
|
|
{
|
|
}
|
|
|
|
public ExternalNotificationDefinition Get(string name)
|
|
{
|
|
return Query.SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
|
|
}
|
|
}
|
|
} |