mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-25 10:19:17 +08:00
NavigatManger
This commit is contained in:
@@ -89,10 +89,10 @@ namespace OrmTest
|
||||
db.Insertable(new Tree1() { Id = 3, Name = "0102", ParentId = 1 }).ExecuteCommand();
|
||||
db.Insertable(new Tree1() { Id = 4, Name = "02" }).ExecuteCommand();
|
||||
db.Insertable(new Tree1() { Id = 5, Name = "0201", ParentId = 2 }).ExecuteCommand();
|
||||
db.Insertable(new Tree1() { Id = 6, Name = "020101", ParentId = 22 }).ExecuteCommand();
|
||||
db.Insertable(new Tree1() { Id = 6, Name = "020101", ParentId = 5 }).ExecuteCommand();
|
||||
var list4=db.Queryable<Tree1>()
|
||||
.Includes(it => it.Child,it=>it.Child)
|
||||
.Includes(it => it.Parent,it=>it.Parent)
|
||||
.Includes(it => it.Child,it=>it.Child,it=>it.Child)
|
||||
.Includes(it => it.Parent,it=>it.Parent, it => it.Parent, it => it.Parent)
|
||||
.ToList();
|
||||
//var json = db.Utilities.SerializeObject(list4);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace SqlSugar
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
var currentList = _preList;
|
||||
var currentList = _preList.Where(it => it != null).ToList();
|
||||
if (RootList == null || currentList.Count == 0) return;
|
||||
var memberExpression = ((_preExpressionList.Last() as LambdaExpression).Body as MemberExpression);
|
||||
var navObjectName = memberExpression.Member.Name;
|
||||
@@ -85,7 +85,7 @@ namespace SqlSugar
|
||||
list = currentList.Select(it => (it.GetType().GetProperty(navObjectName).GetValue(it))).ToList();
|
||||
}
|
||||
ExecuteByLay(item, list, SelectR3);
|
||||
_preList = list;
|
||||
_preList = list.ToList();
|
||||
}
|
||||
_preExpressionList.Add(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user