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

27 lines
667 B
C#
Raw Normal View History

2013-02-27 03:19:22 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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)
: base(database)
{
}
public QualitySize GetByQualityId(int qualityId)
{
return Queryable.Single(q => q.QualityId == qualityId);
}
}
}