update

2881099
2022-04-30 20:30:27 +08:00
parent 0255fe7df9
commit 89fc3e0a37
2 changed files with 28 additions and 2 deletions

@@ -58,7 +58,20 @@ Select<Tag>().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\<T\> extension method, the example is as follows:
```csharp
new List<Song>(new[] { song1, song2, song3 }).IncludeMany(fsql, a => a.Tags);
new List<Song>(new[] { song1, song2, song3 })
.IncludeMany(fsql, a => a.Tags);
```
```c#
new List<Song>(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

@@ -57,7 +57,20 @@ Select<Tag>().IncludeMany(a => a.TestManys.Select(b => new TestMany { Title = b.
当主数据已存在内存中,子数据怎么加载?所以我们增加了 List\<T\> 扩展方法,示例如下:
```csharp
new List<Song>(new[] { song1, song2, song3 }).IncludeMany(fsql, a => a.Tags);
new List<Song>(new[] { song1, song2, song3 })
.IncludeMany(fsql, a => a.Tags);
```
```c#
new List<Song>(new[] { song1, song2, song3 })
.IncludeMany(
orm: fsql,
property: "Tags",
where: "ParentId=Code",
take: 5,
select: "id,name"
);
//v3.2.x
```
## 5、IncludeMany 两种方式对比