mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
got basic relationships working
added support for embedded documents.
This commit is contained in:
parent
b6fc731db8
commit
fc641baab3
51 changed files with 359 additions and 127 deletions
|
@ -124,6 +124,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
void InsertMany<T>(IEnumerable<T> items) where T : ModelBase, new();
|
||||
void Insert<T>(T item) where T : ModelBase, new();
|
||||
IEnumerable<T> All<T>() where T : ModelBase, new();
|
||||
T Single<T>() where T : ModelBase, new();
|
||||
void Update<T>(T childModel) where T : ModelBase, new();
|
||||
void Delete<T>(T childModel) where T : ModelBase, new();
|
||||
}
|
||||
|
@ -152,6 +153,11 @@ namespace NzbDrone.Core.Test.Framework
|
|||
return new BasicRepository<T>(_dbConnection).All();
|
||||
}
|
||||
|
||||
public T Single<T>() where T : ModelBase, new()
|
||||
{
|
||||
return All<T>().SingleOrDefault();
|
||||
}
|
||||
|
||||
public void Update<T>(T childModel) where T : ModelBase, new()
|
||||
{
|
||||
new BasicRepository<T>(_dbConnection).Update(childModel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue