|
|
@ -565,14 +565,14 @@ ParameterT parameter) |
|
|
|
public async Task<List<T>> ToTreeAsync(Expression<Func<T, IEnumerable<object>>> childListExpression, Expression<Func<T, object>> parentIdExpression, object rootValue, object[] childIds) |
|
|
|
{ |
|
|
|
var list = await this.ToListAsync(); |
|
|
|
return TreeAndFilterIds(childListExpression, parentIdExpression, rootValue, childIds, ref list); |
|
|
|
return TreeAndFilterIds(childListExpression, parentIdExpression, rootValue, childIds, ref list) ?? new List<T>(); |
|
|
|
} |
|
|
|
public async Task<List<T>> ToTreeAsync(Expression<Func<T, IEnumerable<object>>> childListExpression, Expression<Func<T, object>> parentIdExpression, object rootValue) |
|
|
|
{ |
|
|
|
var entity = this.Context.EntityMaintenance.GetEntityInfo<T>(); |
|
|
|
var pk = GetTreeKey(entity); ; |
|
|
|
var list = await this.ToListAsync(); |
|
|
|
return GetTreeRoot(childListExpression, parentIdExpression, pk, list, rootValue); |
|
|
|
return GetTreeRoot(childListExpression, parentIdExpression, pk, list, rootValue) ?? new List<T>(); |
|
|
|
} |
|
|
|
public async Task<List<T>> ToParentListAsync(Expression<Func<T, object>> parentIdExpression, object primaryKeyValue) |
|
|
|
{ |
|
|
|