/// <summary> /// Eager-loads a second-level projection of the specified queryable, /// referencing a mapped child of the first eager-loaded child. /// </summary> /// <typeparam name="T"></typeparam> /// <typeparam name="TRel">The type of the rel.</typeparam> /// <typeparam name="TRel2">The type of the rel2.</typeparam> /// <param name="queryable">The queryable.</param> /// <param name="expression">The expression.</param> /// <returns></returns> public static IFetchRequest <T, TRel2> ThenFetchManyOk <T, TRel, TRel2>( this IFetchRequest <T, TRel> queryable, Expression <Func <TRel, IEnumerable <TRel2> > > expression) => queryable is QueryableFetchHelper <T, TRel>? FetchHelper.CreateNonNH <T, TRel2>(queryable) : FetchHelper.Create(queryable.ThenFetchMany(expression));
/// <summary> /// Eager-loads a second-level projection of the specified queryable, /// referencing a mapped child of the first eager-loaded child. /// </summary> public static IFetchRequest <T, TRel2> ThenEagerlyFetchMany <T, TRel, TRel2>( this IFetchRequest <T, TRel> queryable, Expression <Func <TRel, IEnumerable <TRel2> > > expression) { if (queryable is QueryableFetchHelper <T, TRel> ) { return(FetchHelper.CreateNonNH <T, TRel2>(queryable)); } else { return(FetchHelper.Create(queryable.ThenFetchMany(expression))); } }