mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
got basic relationships working
added support for embedded documents.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user