mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-10 10:20:55 +08:00
Merge branch 'master' of https://github.com/2881099/FreeSql.wiki
8
贪婪加载.md
8
贪婪加载.md
@@ -2,14 +2,14 @@
|
||||
|
||||
ManyToOne 导航属性通过 ToList(includeNestedMembers: false) 加载,参数说明:
|
||||
|
||||
false: 返回 2级 Join 的数据(默认);
|
||||
false: 返回 2级 Join 的导航数据(默认);
|
||||
|
||||
true: 返回所有层级深度 Join 的导航数据;
|
||||
true: 返回所有层级深度 Join 的导航数据(未使用的导航数据不会返回);
|
||||
|
||||
```csharp
|
||||
Select<Tag>().Include(a => a.Parent).ToList();
|
||||
Select<Tag>().Include(a => a.Parent.Parent).ToList(true);
|
||||
|
||||
Select<Tag>().Where(a => a.Parent.Name == "1").ToList();
|
||||
Select<Tag>().Where(a => a.Parent.Parent.Name == "1").ToList(true);
|
||||
//这样写,不需要再标记 Join,解析表达式时自动处理成 LeftJoin
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user