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
See Implementation of database providers and extensions and How EF Core queries work for more information and examples.
Constructors
QueryRootExpression(IAsyncQueryProvider, Type)
Creates a new instance of the QueryRootExpression class with associated query provider.
protected QueryRootExpression(IAsyncQueryProvider asyncQueryProvider, Type elementType)
Parameters
asyncQueryProvider
IAsyncQueryProviderThe query provider associated with this query root.
elementType
TypeThe 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
TypeThe element type this query root represents.
Properties
CanReduce
public override bool CanReduce { get; }
Property Value
ElementType
The element type represented by this query root.
public virtual Type ElementType { get; }
Property Value
NodeType
public override ExpressionType NodeType { get; }
Property Value
QueryProvider
The query provider associated with this query root.
public virtual IAsyncQueryProvider? QueryProvider { get; }
Property Value
Type
public override Type Type { get; }
Property Value
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
GetHashCode()
public override int GetHashCode()
Returns
Print(ExpressionPrinter)
Creates a printable string representation of the given expression using ExpressionPrinter.
protected abstract void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinter
ExpressionPrinterThe expression printer to use.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitor