sonarr-repo-only/NzbDrone.Core/Qualities/QualitySizeRepository.cs

25 lines
605 B
C#
Raw Normal View History

2013-03-24 04:16:00 +00:00
using System.Data;
using System.Linq;
2013-02-27 03:19:22 +00: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 03:51:32 +00:00
public QualitySizeRepository(IDatabase database)
2013-03-05 05:37:33 +00:00
: base(database)
2013-02-27 03:19:22 +00:00
{
}
public QualitySize GetByQualityId(int qualityId)
{
2013-03-27 03:44:52 +00:00
return Query.Single(q => q.QualityId == qualityId);
2013-02-27 03:19:22 +00:00
}
}
}