1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-29 18:14:18 -04:00
Files
Sonarr/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingRepository.cs
2026-03-16 16:55:58 -07:00

31 lines
883 B
C#

using System.Collections.Generic;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging.Events;
namespace NzbDrone.Core.DataAugmentation.Scene
{
public interface ISceneMappingRepository : IBasicRepository<SceneMapping>
{
List<SceneMapping> FindByTvdbid(int tvdbId);
List<SceneMapping> GetAllByType(string type);
}
public class SceneMappingRepository : BasicRepository<SceneMapping>, ISceneMappingRepository
{
public SceneMappingRepository(IMainDatabase database, IEventAggregator eventAggregator)
: base(database, eventAggregator)
{
}
public List<SceneMapping> FindByTvdbid(int tvdbId)
{
return Query(x => x.TvdbId == tvdbId);
}
public List<SceneMapping> GetAllByType(string type)
{
return Query(x => x.Type == type);
}
}
}