Table of Contents

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 int

A unique id for the collection being shaped.

parentIdentifier Expression

An identifier for the parent element.

outerIdentifier Expression

An identifier for the outer element.

selfIdentifier Expression

An 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 Expression

An expression used to create individual elements of the collection.

navigation INavigationBase

A navigation associated with this collection, if any.

elementType Type

The 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 int

A unique id for the collection being shaped.

parentIdentifier Expression

An identifier for the parent element.

outerIdentifier Expression

An identifier for the outer element.

selfIdentifier Expression

An identifier for the element in the collection.

innerShaper Expression

An expression used to create individual elements of the collection.

navigation INavigation

A navigation associated with this collection, if any.

elementType Type

The clr type of individual elements in the collection.

Properties

CollectionId

A unique id for this collection shaper.

public virtual int CollectionId { get; }

Property Value

int

ElementType

The clr type of elements of the collection.

public virtual Type ElementType { get; }

Property Value

Type

InnerShaper

The expression to create inner elements.

public virtual Expression InnerShaper { get; }

Property Value

Expression

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

ExpressionType

OuterIdentifier

The identifier for the outer element.

public virtual Expression OuterIdentifier { get; }

Property Value

Expression

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

Expression

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

Expression

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

Type

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 Expression

The ParentIdentifier property of the result.

outerIdentifier Expression

The OuterIdentifier property of the result.

selfIdentifier Expression

The SelfIdentifier property of the result.

innerShaper Expression

The 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

Returns

Expression