Table of Contents

Class IncludeExpression

Namespace
Microsoft.EntityFrameworkCore.Query
Assembly
Microsoft.EntityFrameworkCore.dll

An expression that represents include operation in ShaperExpression.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class IncludeExpression : Expression, IPrintableExpression
Inheritance
IncludeExpression
Implements
Inherited Members
Extension Methods

Remarks

Constructors

IncludeExpression(Expression, Expression, INavigationBase)

Creates a new instance of the IncludeExpression class. The navigation will be set as loaded after completing the Include.

public IncludeExpression(Expression entityExpression, Expression navigationExpression, INavigationBase navigation)

Parameters

entityExpression Expression

An expression to get entity which is performing include.

navigationExpression Expression

An expression to get included navigation element.

navigation INavigationBase

The navigation for this include operation.

IncludeExpression(Expression, Expression, INavigationBase, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
public IncludeExpression(Expression entityExpression, Expression navigationExpression, INavigationBase navigation, bool setLoaded)

Parameters

entityExpression Expression
navigationExpression Expression
navigation INavigationBase
setLoaded bool

Properties

EntityExpression

The expression representing entity performing this include.

public virtual Expression EntityExpression { get; }

Property Value

Expression

Navigation

The navigation associated with this include operation.

public virtual INavigationBase Navigation { get; }

Property Value

INavigationBase

NavigationExpression

The expression representing included navigation element.

public virtual Expression NavigationExpression { get; }

Property Value

Expression

NodeType

public override sealed ExpressionType NodeType { get; }

Property Value

ExpressionType

SetLoaded

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
public virtual bool SetLoaded { get; }

Property Value

bool

Type

public override Type Type { get; }

Property Value

Type

Methods

Update(Expression, Expression)

Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.

public virtual IncludeExpression Update(Expression entityExpression, Expression navigationExpression)

Parameters

entityExpression Expression

The EntityExpression property of the result.

navigationExpression Expression

The NavigationExpression property of the result.

Returns

IncludeExpression

This expression if no children changed, or an expression with the updated children.

VisitChildren(ExpressionVisitor)

protected override Expression VisitChildren(ExpressionVisitor visitor)

Parameters

visitor ExpressionVisitor

Returns

Expression