src/Shared/EntityFramework.Community.Shared/Include/IncludeDbQuery`2.cs
/// <summary>
///     Specifies the related objects to include in the query results and move in the Include chain to the TProperty.
/// </summary>
/// <exception cref="ArgumentException">
///     Thrown when one or more arguments have unsupported or illegal values.
/// </exception>
/// <typeparam name="TProperty">The type of navigation property being included.</typeparam>
/// <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 move in the Include chain to the TProperty.
Specifies the related objects to include in the query results and move in the Include chain to the TProperty .
public IIncludeDbQuery<TQuery, TProperty> Include<TProperty>(Expression<Func<TPropertyCurrent, TProperty>> path)
        {
            string include;
            if (!DbHelpers.TryParsePath(path.Body, out include) || include == null)
            {
                throw new ArgumentException(Strings.DbExtensions_InvalidIncludePathExpression, "path");
            }
            return new IncludeDbQuery<TQuery, TProperty>(Include(include), include);
        }
public IIncludeDbQuery < TQuery , TProperty > Include < TProperty > ( Expression < Func < TPropertyCurrent , TProperty > > path ) { string include ; if ( ! DbHelpers . TryParsePath ( path . Body , out include ) || include == null ) { throw new ArgumentException ( Strings . DbExtensions_InvalidIncludePathExpression , " " ) ; } return new IncludeDbQuery < TQuery , TProperty > ( Include ( include ) , include ) ; }
Specifies the related objects to include in the query results and move in the Include chain to the TProperty.
Specifies the related objects to include in the query results and move in the Include chain to the TProperty .
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 .
path
Expression<Func<TPropertyCurrent, TProperty>>
A lambda expression representing the path to include.
A lambda expression representing the path to include .
typeparam
The type of navigation property being included.
The type of navigation property being included .