- 优化 WithTempQuery + ToList 使用子查询;

This commit is contained in:
2881099
2023-03-02 19:48:34 +08:00
parent df3073819d
commit a7c3783e8a
6 changed files with 38 additions and 5 deletions

View File

@ -864,9 +864,10 @@ namespace base_entity
var testsublist2 = fsql.Select<UserGroup>()
.GroupBy(a => new { a.Id })
.WithTempQuery(a => a.Key)
.First(a => new
{
a.Id,
id = a,
list = userRepository.Select.Where(b => b.GroupId == a.Id).ToList(),
list2 = userRepository.Select.Where(b => b.GroupId == a.Id).ToList(b => b.Nickname),
});