1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Core/Qualities/QualitySizeRepository.cs

25 lines
611 B
C#
Raw Normal View History

2013-03-24 07:16:00 +03:00
using System.Data;
using System.Linq;
2013-02-27 06:19:22 +03:00
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.Qualities
{
public interface IQualitySizeRepository : IBasicRepository<QualitySize>
{
QualitySize GetByQualityId(int qualityId);
}
public class QualitySizeRepository : BasicRepository<QualitySize>, IQualitySizeRepository
{
2013-03-25 06:51:32 +03:00
public QualitySizeRepository(IDatabase database)
2013-03-05 08:37:33 +03:00
: base(database)
2013-02-27 06:19:22 +03:00
{
}
public QualitySize GetByQualityId(int qualityId)
{
2013-03-25 06:51:32 +03:00
return Queryable().Single(q => q.QualityId == qualityId);
2013-02-27 06:19:22 +03:00
}
}
}