Share via


EntityShaperExpression.WithEntityType(IEntityType) Method

Definition

Changes the entity type being shaped by this entity shaper.

public virtual Microsoft.EntityFrameworkCore.Query.EntityShaperExpression WithEntityType (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
abstract member WithEntityType : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Query.EntityShaperExpression
override this.WithEntityType : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Query.EntityShaperExpression
Public Overridable Function WithEntityType (entityType As IEntityType) As EntityShaperExpression

Parameters

entityType
IEntityType

The new entity type to use.

Returns

This expression if entity type not changed, or an expression with updated entity type.

Applies to