mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-31 04:00:18 -07:00
Quality moved to ObjectDb.
This commit is contained in:
parent
065b86c159
commit
c6836e0cb1
79 changed files with 800 additions and 966 deletions
26
NzbDrone.Core/Qualities/QualitySizeRepository.cs
Normal file
26
NzbDrone.Core/Qualities/QualitySizeRepository.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue