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
2013-03-25 23:19:55 -07:00

25 lines
611 B
C#

using System.Data;
using System.Linq;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.Qualities
{
public interface IQualitySizeRepository : IBasicRepository<QualitySize>
{
QualitySize GetByQualityId(int qualityId);
}
public class QualitySizeRepository : BasicRepository<QualitySize>, IQualitySizeRepository
{
public QualitySizeRepository(IDatabase database)
: base(database)
{
}
public QualitySize GetByQualityId(int qualityId)
{
return Queryable().Single(q => q.QualityId == qualityId);
}
}
}