mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
moved naming specification out of general config.
This commit is contained in:
parent
db37d020f4
commit
dce64a5530
23 changed files with 535 additions and 463 deletions
|
@ -8,13 +8,15 @@ namespace NzbDrone.Core.Datastore
|
|||
IEnumerable<TModel> All();
|
||||
int Count();
|
||||
TModel Get(int id);
|
||||
TModel Single();
|
||||
TModel SingleOrDefault();
|
||||
TModel Insert(TModel model);
|
||||
TModel Update(TModel model);
|
||||
TModel Upsert(TModel model);
|
||||
TModel UpSert(TModel model);
|
||||
void Delete(int id);
|
||||
IList<TModel> InsertMany(IList<TModel> model);
|
||||
IList<TModel> UpdateMany(IList<TModel> model);
|
||||
void DeleteMany(IList<TModel> model);
|
||||
void DeleteMany(List<TModel> model);
|
||||
void Purge();
|
||||
bool HasItems();
|
||||
}
|
||||
|
@ -45,6 +47,16 @@ namespace NzbDrone.Core.Datastore
|
|||
return Queryable.Single(c => c.Id == id);
|
||||
}
|
||||
|
||||
public TModel Single()
|
||||
{
|
||||
return Queryable.Single();
|
||||
}
|
||||
|
||||
public TModel SingleOrDefault()
|
||||
{
|
||||
return Queryable.SingleOrDefault();
|
||||
}
|
||||
|
||||
public TModel Insert(TModel model)
|
||||
{
|
||||
return ObjectDatabase.Insert(model);
|
||||
|
@ -65,12 +77,12 @@ namespace NzbDrone.Core.Datastore
|
|||
return ObjectDatabase.UpdateMany(model);
|
||||
}
|
||||
|
||||
public void DeleteMany(IList<TModel> model)
|
||||
public void DeleteMany(List<TModel> model)
|
||||
{
|
||||
ObjectDatabase.DeleteMany(model);
|
||||
}
|
||||
|
||||
public TModel Upsert(TModel model)
|
||||
public TModel UpSert(TModel model)
|
||||
{
|
||||
if (model.Id == 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue