Class ShapedQueryExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query
- Assembly
- Microsoft.EntityFrameworkCore.dll
An expression that combines a query expression and shaper expression.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class ShapedQueryExpression : Expression, IPrintableExpression
- Inheritance
-
ShapedQueryExpression
- 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
ShapedQueryExpression(Expression, Expression)
Creates a new instance of the ShapedQueryExpression class with associated query and shaper expressions.
public ShapedQueryExpression(Expression queryExpression, Expression shaperExpression)
Parameters
queryExpression
ExpressionThe query expression to get results from server.
shaperExpression
ExpressionThe shaper expression to create result objects from server results.
Properties
NodeType
public override sealed ExpressionType NodeType { get; }
Property Value
QueryExpression
An expression representing the query to be run against server to retrieve the data.
public virtual Expression QueryExpression { get; }
Property Value
ResultCardinality
The cardinality of the results generated.
public virtual ResultCardinality ResultCardinality { get; }
Property Value
ShaperExpression
An expression representing the shaper to be run on the results fetched from the server.
public virtual Expression ShaperExpression { 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 ShapedQueryExpression Update(Expression queryExpression, Expression shaperExpression)
Parameters
queryExpression
ExpressionThe QueryExpression property of the result.
shaperExpression
ExpressionThe ShaperExpression property of the result.
Returns
- ShapedQueryExpression
This expression if no children changed, or an expression with the updated children.
UpdateQueryExpression(Expression)
Creates a new expression that is like this one, but using the supplied query expression. If query expression is the same, it will return this expression.
public virtual ShapedQueryExpression UpdateQueryExpression(Expression queryExpression)
Parameters
queryExpression
ExpressionThe QueryExpression property of the result.
Returns
- ShapedQueryExpression
This expression if shaper expression did not change, or an expression with the updated shaper expression.
UpdateResultCardinality(ResultCardinality)
Creates a new expression that is like this one, but with supplied result cardinality.
public virtual ShapedQueryExpression UpdateResultCardinality(ResultCardinality resultCardinality)
Parameters
resultCardinality
ResultCardinalityThe ResultCardinality property of the result.
Returns
- ShapedQueryExpression
An expression with the updated result cardinality.
UpdateShaperExpression(Expression)
Creates a new expression that is like this one, but using the supplied shaper expression. If shaper expression is the same, it will return this expression.
public virtual ShapedQueryExpression UpdateShaperExpression(Expression shaperExpression)
Parameters
shaperExpression
ExpressionThe ShaperExpression property of the result.
Returns
- ShapedQueryExpression
This expression if shaper expression did not change, or an expression with the updated shaper expression.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitor