mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
24 lines
734 B
C#
24 lines
734 B
C#
using System.Data;
|
|
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
|
|
{
|
|
public ExternalNotificationRepository(IDatabase database)
|
|
: base(database)
|
|
{
|
|
}
|
|
|
|
public ExternalNotificationDefinition Get(string name)
|
|
{
|
|
return Queryable().SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
|
|
}
|
|
}
|
|
} |