Table of Contents

Class RelationalEntityShaperExpression

Namespace
Microsoft.EntityFrameworkCore.Query
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

An expression that represents creation of an entity instance for a 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 RelationalEntityShaperExpression : EntityShaperExpression
Inheritance
RelationalEntityShaperExpression

Constructors

RelationalEntityShaperExpression(IEntityType, Expression, bool)

Creates a new instance of the RelationalEntityShaperExpression class.

public RelationalEntityShaperExpression(IEntityType entityType, Expression valueBufferExpression, bool nullable)

Parameters

entityType IEntityType

The entity type to shape.

valueBufferExpression Expression

An expression of ValueBuffer to get values for properties of the entity.

nullable bool

A bool value indicating whether this entity instance can be null.

RelationalEntityShaperExpression(IEntityType, Expression, bool, LambdaExpression)

Creates a new instance of the RelationalEntityShaperExpression class.

protected RelationalEntityShaperExpression(IEntityType entityType, Expression valueBufferExpression, bool nullable, LambdaExpression materializationCondition)

Parameters

entityType IEntityType

The entity type to shape.

valueBufferExpression Expression

An expression of ValueBuffer to get values for properties of the entity.

nullable bool

Whether this entity instance can be null.

materializationCondition LambdaExpression

An expression of Func<T, TResult> to determine which entity type to materialize.

Methods

GenerateMaterializationCondition(IEntityType, bool)

protected override LambdaExpression GenerateMaterializationCondition(IEntityType entityType, bool nullable)

Parameters

entityType IEntityType
nullable bool

Returns

LambdaExpression

MarkAsNullable()

public override EntityShaperExpression MarkAsNullable()

Returns

EntityShaperExpression

Update(Expression)

public override EntityShaperExpression Update(Expression valueBufferExpression)

Parameters

valueBufferExpression Expression

Returns

EntityShaperExpression

WithEntityType(IEntityType)

public override EntityShaperExpression WithEntityType(IEntityType entityType)

Parameters

entityType IEntityType

Returns

EntityShaperExpression