- 增加 IncludeMany Take(5) 功能,实现每个子集合只取5条记录;

This commit is contained in:
28810
2019-05-17 20:40:06 +08:00
parent 0d8acb5ed4
commit 76baa5b9c0
11 changed files with 765 additions and 129 deletions

View File

@ -305,7 +305,7 @@ namespace FreeSql {
/// 贪婪加载集合的导航属性其实是分两次查询ToList 后进行了数据重装
/// </summary>
/// <typeparam name="TNavigate"></typeparam>
/// <param name="navigateSelector">选择一个集合的导航属性,也可通过 .Where 设置临时的关系映射</param>
/// <param name="navigateSelector">选择一个集合的导航属性,也可通过 .Where 设置临时的关系映射,还可以 .Take(5) 每个子集合只取5条</param>
/// <param name="then">即能 ThenInclude还可以二次过滤这个 EFCore 做不到?)</param>
/// <returns></returns>
ISelect<T1> IncludeMany<TNavigate>(Expression<Func<T1, IEnumerable<TNavigate>>> navigateSelector, Action<ISelect<TNavigate>> then = null) where TNavigate : class;