New: Added option to filter Release Profile to a specific indexer

Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
Jacob
2019-06-05 20:54:59 -05:00
committed by Qstick
parent 739ebf25c0
commit ea4044f237
30 changed files with 318 additions and 76 deletions

View File

@@ -17,6 +17,7 @@ namespace NzbDrone.Core.Datastore
{
IEnumerable<TModel> All();
int Count();
TModel Find(int id);
TModel Get(int id);
TModel Insert(TModel model);
TModel Update(TModel model);
@@ -88,10 +89,17 @@ namespace NzbDrone.Core.Datastore
return Query(Builder());
}
public TModel Get(int id)
public TModel Find(int id)
{
var model = Query(x => x.Id == id).FirstOrDefault();
return model;
}
public TModel Get(int id)
{
var model = Find(id);
if (model == null)
{
throw new ModelNotFoundException(typeof(TModel), id);