Class RelationalCollectionShaperExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents creation of a collection for relational provider in Microsoft.EntityFrameworkCore.Query.ShapedQueryExpression.ShaperExpression.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class RelationalCollectionShaperExpression : Expression, IPrintableExpression
- Inheritance
-
RelationalCollectionShaperExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
RelationalCollectionShaperExpression(int, Expression, Expression, Expression, IReadOnlyList<ValueComparer>, IReadOnlyList<ValueComparer>, IReadOnlyList<ValueComparer>, Expression, INavigationBase, Type)
Creates a new instance of the RelationalCollectionShaperExpression class.
public RelationalCollectionShaperExpression(int collectionId, Expression parentIdentifier, Expression outerIdentifier, Expression selfIdentifier, IReadOnlyList<ValueComparer> parentIdentifierValueComparers, IReadOnlyList<ValueComparer> outerIdentifierValueComparers, IReadOnlyList<ValueComparer> selfIdentifierValueComparers, Expression innerShaper, INavigationBase navigation, Type elementType)
Parameters
collectionIdintA unique id for the collection being shaped.
parentIdentifierExpressionAn identifier for the parent element.
outerIdentifierExpressionAn identifier for the outer element.
selfIdentifierExpressionAn identifier for the element in the collection.
parentIdentifierValueComparersIReadOnlyList<ValueComparer>A list of value comparers to compare parent identifier.
outerIdentifierValueComparersIReadOnlyList<ValueComparer>A list of value comparers to compare outer identifier.
selfIdentifierValueComparersIReadOnlyList<ValueComparer>A list of value comparers to compare self identifier.
innerShaperExpressionAn expression used to create individual elements of the collection.
navigationINavigationBaseA navigation associated with this collection, if any.
elementTypeTypeThe clr type of individual elements in the collection.
RelationalCollectionShaperExpression(int, Expression, Expression, Expression, Expression, INavigation, Type)
Creates a new instance of the RelationalCollectionShaperExpression class.
[Obsolete("Use ctor which takes value comaprers.")]
public RelationalCollectionShaperExpression(int collectionId, Expression parentIdentifier, Expression outerIdentifier, Expression selfIdentifier, Expression innerShaper, INavigation navigation, Type elementType)
Parameters
collectionIdintA unique id for the collection being shaped.
parentIdentifierExpressionAn identifier for the parent element.
outerIdentifierExpressionAn identifier for the outer element.
selfIdentifierExpressionAn identifier for the element in the collection.
innerShaperExpressionAn expression used to create individual elements of the collection.
navigationINavigationA navigation associated with this collection, if any.
elementTypeTypeThe clr type of individual elements in the collection.
Properties
CollectionId
A unique id for this collection shaper.
public virtual int CollectionId { get; }
Property Value
ElementType
The clr type of elements of the collection.
public virtual Type ElementType { get; }
Property Value
InnerShaper
The expression to create inner elements.
public virtual Expression InnerShaper { get; }
Property Value
Navigation
The navigation if associated with the collection.
public virtual INavigationBase Navigation { get; }
Property Value
- INavigationBase
NodeType
public override sealed ExpressionType NodeType { get; }
Property Value
OuterIdentifier
The identifier for the outer element.
public virtual Expression OuterIdentifier { get; }
Property Value
OuterIdentifierValueComparers
The list of value comparers to compare outer identifier.
public virtual IReadOnlyList<ValueComparer> OuterIdentifierValueComparers { get; }
Property Value
- IReadOnlyList<ValueComparer>
ParentIdentifier
The identifier for the parent element.
public virtual Expression ParentIdentifier { get; }
Property Value
ParentIdentifierValueComparers
The list of value comparers to compare parent identifier.
public virtual IReadOnlyList<ValueComparer> ParentIdentifierValueComparers { get; }
Property Value
- IReadOnlyList<ValueComparer>
SelfIdentifier
The identifier for the element in the collection.
public virtual Expression SelfIdentifier { get; }
Property Value
SelfIdentifierValueComparers
The list of value comparers to compare self identifier.
public virtual IReadOnlyList<ValueComparer> SelfIdentifierValueComparers { get; }
Property Value
- IReadOnlyList<ValueComparer>
Type
public override Type Type { get; }
Property Value
Methods
Update(Expression, Expression, 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 RelationalCollectionShaperExpression Update(Expression parentIdentifier, Expression outerIdentifier, Expression selfIdentifier, Expression innerShaper)
Parameters
parentIdentifierExpressionThe ParentIdentifier property of the result.
outerIdentifierExpressionThe OuterIdentifier property of the result.
selfIdentifierExpressionThe SelfIdentifier property of the result.
innerShaperExpressionThe InnerShaper property of the result.
Returns
- RelationalCollectionShaperExpression
This expression if no children changed, or an expression with the updated children.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitorExpressionVisitor