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
collectionId
intA unique id for the collection being shaped.
parentIdentifier
ExpressionAn identifier for the parent element.
outerIdentifier
ExpressionAn identifier for the outer element.
selfIdentifier
ExpressionAn identifier for the element in the collection.
parentIdentifierValueComparers
IReadOnlyList<ValueComparer>A list of value comparers to compare parent identifier.
outerIdentifierValueComparers
IReadOnlyList<ValueComparer>A list of value comparers to compare outer identifier.
selfIdentifierValueComparers
IReadOnlyList<ValueComparer>A list of value comparers to compare self identifier.
innerShaper
ExpressionAn expression used to create individual elements of the collection.
navigation
INavigationBaseA navigation associated with this collection, if any.
elementType
TypeThe 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
collectionId
intA unique id for the collection being shaped.
parentIdentifier
ExpressionAn identifier for the parent element.
outerIdentifier
ExpressionAn identifier for the outer element.
selfIdentifier
ExpressionAn identifier for the element in the collection.
innerShaper
ExpressionAn expression used to create individual elements of the collection.
navigation
INavigationA navigation associated with this collection, if any.
elementType
TypeThe 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
parentIdentifier
ExpressionThe ParentIdentifier property of the result.
outerIdentifier
ExpressionThe OuterIdentifier property of the result.
selfIdentifier
ExpressionThe SelfIdentifier property of the result.
innerShaper
ExpressionThe 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
visitor
ExpressionVisitor