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
See Implementation of database providers and extensions and How EF Core queries work for more information and examples.
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
ExpressionAn expression to get entity which is performing include.
navigationExpression
ExpressionAn expression to get included navigation element.
navigation
INavigationBaseThe 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
ExpressionnavigationExpression
Expressionnavigation
INavigationBasesetLoaded
bool
Properties
EntityExpression
The expression representing entity performing this include.
public virtual Expression EntityExpression { get; }
Property Value
Navigation
The navigation associated with this include operation.
public virtual INavigationBase Navigation { get; }
Property Value
NavigationExpression
The expression representing included navigation element.
public virtual Expression NavigationExpression { get; }
Property Value
NodeType
public override sealed ExpressionType NodeType { get; }
Property Value
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
Type
public override Type Type { get; }
Property Value
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
ExpressionThe EntityExpression property of the result.
navigationExpression
ExpressionThe 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