update

2881099
2022-08-13 17:34:14 +08:00
parent 42c20638eb
commit ad2e779ec4

@@ -96,9 +96,9 @@ fsql.Select<Region>().OrderBy("a.id desc") //提示存在SQL注入安全问
- 支持导航属性,比如 OrderByPropertyName("Parent.Code")
- 支持多表查询,比如 OrderByPropertyName("b.Code")
## 动态贪婪加载 IncludeByPropertyName
## 动态贪婪加载
ISelect.IncludeByPropertyName 方法实现动态贪婪加载,对应 Include/IncludeMany
1、ISelect.IncludeByPropertyName 方法实现动态贪婪加载,对应 Include/IncludeMany
```csharp
fsql.Select<Region>()
@@ -111,7 +111,7 @@ fsql.Select<Region>()
.ToList();
```
List\<TDto\> 也支持贪婪加载,只支持 OneToMany
2、List\<TDto\>.IncludeByPropertyName 扩展方法也实现了 OneToMany 动态贪婪加载
```csharp
var dtos = fsql.Select<Region>().ToList<Dto>();
@@ -120,7 +120,7 @@ var dtos = fsql.Select<Region>().ToList<Dto>();
dtos.IncludeByPropertyName(
orm: fsql,
property: "Childs",
where: "ParentId=Id",
where: "ParentId=Id", //临时关系
take: 5,
select: "id,name",
then => then.IncludeByPropertyName("Parent")