2013-03-05 08:37:33 +03:00
|
|
|
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
|
|
|
|
{
|
|
|
|
public QualitySizeRepository(IObjectDatabase database)
|
2013-03-05 08:37:33 +03:00
|
|
|
: base(database)
|
2013-02-27 06:19:22 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public QualitySize GetByQualityId(int qualityId)
|
|
|
|
{
|
|
|
|
return Queryable.Single(q => q.QualityId == qualityId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|