using System.Collections.Generic; using NzbDrone.Core.Datastore; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Applications { public interface IAppIndexerMapRepository : IBasicRepository { List GetMappingsForApp(int appId); void DeleteAllForApp(int appId); } public class AppIndexerMapRepository : BasicRepository, IAppIndexerMapRepository { public AppIndexerMapRepository(IMainDatabase database, IEventAggregator eventAggregator) : base(database, eventAggregator) { } public void DeleteAllForApp(int appId) { Delete(x => x.AppId == appId); } public List GetMappingsForApp(int appId) { return Query(x => x.AppId == appId); } } }