GetAll also for child client
This commit is contained in:
@@ -34,8 +34,12 @@ public abstract class BaseChildItemHandler<TEntity, TParent, TUpdateMsg>(IApiSer
|
||||
{
|
||||
IQueryable<TEntity> list;
|
||||
|
||||
if (parent != 0 && server.Manager.Find(parent, out TParent? parentEntity))
|
||||
if (parent != 0)
|
||||
{
|
||||
if (!server.Manager.Find(parent, out TParent? parentEntity))
|
||||
return ApiResult.NotFound();
|
||||
list = GetChilds(parentEntity).AsQueryable();
|
||||
}
|
||||
else
|
||||
list = server.Manager.Get<TEntity>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user