Share via


QueryRootExpression Class

Definition

An expression that represents a query root in query expression.

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

public class QueryRootExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression
public abstract class QueryRootExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression
type QueryRootExpression = class
    inherit Expression
    interface IPrintableExpression
Public Class QueryRootExpression
Inherits Expression
Implements IPrintableExpression
Public MustInherit Class QueryRootExpression
Inherits Expression
Implements IPrintableExpression
Inheritance
QueryRootExpression
Derived
Implements

Remarks

See Implementation of database providers and extensions and How EF Core queries work for more information and examples.

Constructors

QueryRootExpression(IAsyncQueryProvider, IEntityType)

Creates a new instance of the QueryRootExpression class with associated query provider.

QueryRootExpression(IAsyncQueryProvider, Type)

Creates a new instance of the QueryRootExpression class with associated query provider.

QueryRootExpression(IEntityType)

Creates a new instance of the QueryRootExpression class without any query provider.

QueryRootExpression(Type)

Creates a new instance of the EntityQueryRootExpression class without any query provider.

Properties

CanReduce

Indicates that the node can be reduced to a simpler node. If this returns true, Reduce() can be called to produce the reduced form.

ElementType

The element type represented by this query root.

EntityType

The entity type reprenseted by this query root.

NodeType

Gets the node type of this Expression.

QueryProvider

The query provider associated with this query root.

Type

Gets the static type of the expression that this Expression represents.

Methods

DetachQueryProvider()

Detaches the associated query provider from this query root expression.

Equals(Object) System.Linq.Expressions.Expression.Equals(System.Object)
GetHashCode() System.Linq.Expressions.Expression.GetHashCode
Print(ExpressionPrinter)

Creates a printable string representation of the given expression using ExpressionPrinter.

UpdateEntityType(IEntityType)

Updates entity type associated with this query root with equivalent optimized version.

VisitChildren(ExpressionVisitor)

Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.

Explicit Interface Implementations

IPrintableExpression.Print(ExpressionPrinter)

Creates a printable string representation of the given expression using ExpressionPrinter.

Applies to