From ad2e779ec49511d4199d51b5479bca467fa50645 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Sat, 13 Aug 2022 17:34:14 +0800 Subject: [PATCH] update --- 动态操作.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/动态操作.md b/动态操作.md index 09f4955..67de17f 100644 --- a/动态操作.md +++ b/动态操作.md @@ -96,9 +96,9 @@ fsql.Select().OrderBy("a.id desc") //提示:存在SQL注入安全问 - 支持导航属性,比如 OrderByPropertyName("Parent.Code") - 支持多表查询,比如 OrderByPropertyName("b.Code") -## 动态贪婪加载 IncludeByPropertyName +## 动态贪婪加载 -ISelect.IncludeByPropertyName 方法实现动态贪婪加载,对应 Include/IncludeMany。 +1、ISelect.IncludeByPropertyName 方法实现动态贪婪加载,对应 Include/IncludeMany: ```csharp fsql.Select() @@ -111,7 +111,7 @@ fsql.Select() .ToList(); ``` -List\ 也支持贪婪加载,只支持 OneToMany: +2、List\.IncludeByPropertyName 扩展方法也实现了 OneToMany 动态贪婪加载: ```csharp var dtos = fsql.Select().ToList(); @@ -120,7 +120,7 @@ var dtos = fsql.Select().ToList(); dtos.IncludeByPropertyName( orm: fsql, property: "Childs", - where: "ParentId=Id", + where: "ParentId=Id", //临时关系 take: 5, select: "id,name", then => then.IncludeByPropertyName("Parent")