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