Table of Contents

Class QueryRootExpression

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

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 abstract class QueryRootExpression : Expression, IPrintableExpression
Inheritance
QueryRootExpression
Implements
Derived
Inherited Members
Extension Methods

Remarks

Constructors

QueryRootExpression(IAsyncQueryProvider, Type)

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

protected QueryRootExpression(IAsyncQueryProvider asyncQueryProvider, Type elementType)

Parameters

asyncQueryProvider IAsyncQueryProvider

The query provider associated with this query root.

elementType Type

The element type this query root represents.

QueryRootExpression(Type)

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

protected QueryRootExpression(Type elementType)

Parameters

elementType Type

The element type this query root represents.

Properties

CanReduce

public override bool CanReduce { get; }

Property Value

bool

ElementType

The element type represented by this query root.

public virtual Type ElementType { get; }

Property Value

Type

NodeType

public override ExpressionType NodeType { get; }

Property Value

ExpressionType

QueryProvider

The query provider associated with this query root.

public virtual IAsyncQueryProvider? QueryProvider { get; }

Property Value

IAsyncQueryProvider

Type

public override Type Type { get; }

Property Value

Type

Methods

DetachQueryProvider()

Detaches the associated query provider from this query root expression.

public abstract Expression DetachQueryProvider()

Returns

Expression

A new query root expression without query provider.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Print(ExpressionPrinter)

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

protected abstract void Print(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

The expression printer to use.

VisitChildren(ExpressionVisitor)

protected override Expression VisitChildren(ExpressionVisitor visitor)

Parameters

visitor ExpressionVisitor

Returns

Expression