1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-29 02:57:15 +02:00
Sonarr/NzbDrone.Core/Tv/SeasonRepository.cs

26 lines
674 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Datastore;
2013-09-11 09:33:47 +03:00
using NzbDrone.Core.Messaging;
2013-03-25 06:51:32 +03:00
namespace NzbDrone.Core.Tv
{
2013-09-10 08:22:38 +03:00
public interface ISeasonRepository : IBasicRepository<Series>
{
List<Season> GetSeasonBySeries(int seriesId);
}
2013-09-10 08:22:38 +03:00
public class SeasonRepository : BasicRepository<Series>, ISeasonRepository
{
2013-05-06 00:24:33 +03:00
public SeasonRepository(IDatabase database, IMessageAggregator messageAggregator)
: base(database, messageAggregator)
{
}
public List<Season> GetSeasonBySeries(int seriesId)
{
2013-09-10 08:22:38 +03:00
return Query.Single(s => s.Id == seriesId).Seasons;
}
}
}