src/Shared/EntityFramework.Community.Shared/Include/AlsoInclude/IIncludeDbQuery`2.cs
/// <summary>
///     Specifies the related objects to include in the query results and stay in the Include chain to the
///     TPropertyCurrent.
/// </summary>
/// <exception cref="ArgumentException">
///     Thrown when one or more arguments have unsupported or illegal values.
/// </exception>
/// <typeparam name="TQuery">The type of entity being queried.</typeparam>
/// <typeparam name="TPropertyCurrent">The type of the current property in the IncludeChain.</typeparam>
/// <typeparam name="TProperty">The type of navigation property being included.</typeparam>
/// <param name="this">The IIncludeDbQuery to act on.</param>
/// <param name="path">A lambda expression representing the path to include.</param>
/// <returns>A new IncludeDbQuery&lt;TQuery, TProperty&gt; with the defined query path.</returns>
Specifies the related objects to include in the query results and stay in the Include chain to the
TPropertyCurrent.
Specifies the related objects to include in the query results and stay in the Include chain to the TPropertyCurrent .
public static IncludeDbQuery<TQuery, TPropertyCurrent> AlsoInclude<TQuery, TPropertyCurrent, TProperty>(this IIncludeDbQuery<TQuery, TPropertyCurrent> @this, Expression<Func<TPropertyCurrent, TProperty>> path)
    {
        string include;
        if (!DbHelpers.TryParsePath(path.Body, out include) || include == null)
        {
            throw new ArgumentException(Strings.DbExtensions_InvalidIncludePathExpression, "path");
        }
        include = @this.IncludePath + "." + include;
        return new IncludeDbQuery<TQuery, TPropertyCurrent>(@this.Include(include), @this.IncludePath);
    }
public static IncludeDbQuery < TQuery , TPropertyCurrent > AlsoInclude < TQuery , TPropertyCurrent , TProperty > ( this IIncludeDbQuery < TQuery , TPropertyCurrent > @this , Expression < Func < TPropertyCurrent , TProperty > > path ) { string include ; if ( ! DbHelpers . TryParsePath ( path . Body , out include ) || include == null ) { throw new ArgumentException ( Strings . DbExtensions_InvalidIncludePathExpression , " " ) ; } include = @this . IncludePath + " " + include ; return new IncludeDbQuery < TQuery , TPropertyCurrent > ( @this . Include ( include ) , @this . IncludePath ) ; }
Specifies the related objects to include in the query results and stay in the Include chain to the
TPropertyCurrent.
Specifies the related objects to include in the query results and stay in the Include chain to the TPropertyCurrent .
A new IncludeDbQuery with the defined query path.
A new IncludeDbQuery with the defined query path .
Thrown when one or more arguments have unsupported or illegal values.
Thrown when one or more arguments have unsupported or illegal values .
IIncludeDbQuery<TQuery, TPropertyCurrent>
this
path
Expression<Func<TPropertyCurrent, TProperty>>
A lambda expression representing the path to include.
A lambda expression representing the path to include .
this
The IIncludeDbQuery to act on.
The IIncludeDbQuery to act on .
typeparam
The type of entity being queried.
The type of entity being queried .
typeparam
The type of the current property in the IncludeChain.
The type of the current property in the IncludeChain .
typeparam
The type of navigation property being included.
The type of navigation property being included .