mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
@@ -5,14 +5,14 @@ using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using Marr.Data;
|
||||
using Marr.Data.QGen;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Datastore.Events;
|
||||
using NzbDrone.Core.Datastore.Extensions;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
namespace NzbDrone.Core.Datastore
|
||||
{
|
||||
public interface IBasicRepository<TModel> where TModel : ModelBase, new()
|
||||
public interface IBasicRepository<TModel>
|
||||
where TModel : ModelBase, new()
|
||||
{
|
||||
IEnumerable<TModel> All();
|
||||
int Count();
|
||||
@@ -36,7 +36,8 @@ namespace NzbDrone.Core.Datastore
|
||||
PagingSpec<TModel> GetPaged(PagingSpec<TModel> pagingSpec);
|
||||
}
|
||||
|
||||
public class BasicRepository<TModel> : IBasicRepository<TModel> where TModel : ModelBase, new()
|
||||
public class BasicRepository<TModel> : IBasicRepository<TModel>
|
||||
where TModel : ModelBase, new()
|
||||
{
|
||||
private readonly IDatabase _database;
|
||||
private readonly IEventAggregator _eventAggregator;
|
||||
@@ -184,6 +185,7 @@ namespace NzbDrone.Core.Datastore
|
||||
Insert(model);
|
||||
return model;
|
||||
}
|
||||
|
||||
Update(model);
|
||||
return model;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user