public static IIncludableQueryable <T, TProperty> ThenInclude <T, TPreviousProperty, TProperty>( this IIncludableQueryable <T, IEnumerable <TPreviousProperty> > source, Expression <Func <TPreviousProperty, TProperty> > navigationPropertyPath) { source.AssertNotNull(nameof(source)); navigationPropertyPath.AssertNotNull(nameof(navigationPropertyPath)); return(new IncludableQueryable <T, TProperty>( source.Provider is IRemoteLinqQueryProvider ? source.Provider.CreateQuery <T>( Expression.Call( ThenIncludeAfterEnumerableMethodInfo.MakeGenericMethod(typeof(T), typeof(TPreviousProperty), typeof(TProperty)), source.Expression, Expression.Quote(navigationPropertyPath))) : source)); }