From 89fc3e0a37ff051539fd081ab1ca625aa6f02150 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Sat, 30 Apr 2022 20:30:27 +0800 Subject: [PATCH] update --- Greed-Loading.md | 15 ++++++++++++++- 贪婪加载.md | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Greed-Loading.md b/Greed-Loading.md index 84fc310..df9f9d5 100644 --- a/Greed-Loading.md +++ b/Greed-Loading.md @@ -58,7 +58,20 @@ Select().IncludeMany(a => a.TestManys.Select(b => new TestMany { Title = b. When the main data already exists in the memory, how to load the sub-data? So we added the List\ extension method, the example is as follows: ```csharp -new List(new[] { song1, song2, song3 }).IncludeMany(fsql, a => a.Tags); +new List(new[] { song1, song2, song3 }) + .IncludeMany(fsql, a => a.Tags); +``` + +```c# +new List(new[] { song1, song2, song3 }) + .IncludeMany( + orm: fsql, + property: "Tags", + where: "ParentId=Code", + take: 5, + select: "id,name" + ); +//v3.2.x ``` ## Comparison of the Two Ways of IncludeMany diff --git a/贪婪加载.md b/贪婪加载.md index c99fffa..468704e 100644 --- a/贪婪加载.md +++ b/贪婪加载.md @@ -57,7 +57,20 @@ Select().IncludeMany(a => a.TestManys.Select(b => new TestMany { Title = b. 当主数据已存在内存中,子数据怎么加载?所以我们增加了 List\ 扩展方法,示例如下: ```csharp -new List(new[] { song1, song2, song3 }).IncludeMany(fsql, a => a.Tags); +new List(new[] { song1, song2, song3 }) + .IncludeMany(fsql, a => a.Tags); +``` + +```c# +new List(new[] { song1, song2, song3 }) + .IncludeMany( + orm: fsql, + property: "Tags", + where: "ParentId=Code", + take: 5, + select: "id,name" + ); +//v3.2.x ``` ## 5、IncludeMany 两种方式对比