EntityProjectionExpression Constructors

Definition

Overloads

EntityProjectionExpression(IEntityType, IDictionary<IProperty,ColumnExpression>)

Source:
EntityProjectionExpression.cs
Source:
EntityProjectionExpression.cs
C#
public EntityProjectionExpression (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IDictionary<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Query.SqlExpressions.ColumnExpression> propertyExpressions);

Parameters

entityType
IEntityType
propertyExpressions
IDictionary<IProperty,ColumnExpression>

Applies to

Entity Framework Core 3.1 ja Entity Framework Core 3.0
Toode Versioonid
Entity Framework Core 3.0, 3.1

EntityProjectionExpression(IEntityType, TableExpressionBase, Boolean)

Source:
EntityProjectionExpression.cs
Source:
EntityProjectionExpression.cs
Source:
EntityProjectionExpression.cs
Source:
EntityProjectionExpression.cs

Caution

Use the constructor which takes populated column expressions map.

Creates a new instance of the EntityProjectionExpression class.

C#
public EntityProjectionExpression (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpressionBase innerTable, bool nullable);
C#
[System.Obsolete("Use the constructor which takes populated column expressions map.", true)]
public EntityProjectionExpression (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpressionBase innerTable, bool nullable);

Parameters

entityType
IEntityType

The entity type to shape.

innerTable
TableExpressionBase

The table from which entity columns are being projected out.

nullable
Boolean

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

Attributes

Applies to

Entity Framework Core 6.0 ja muud versioonid
Toode Versioonid (aegunud)
Entity Framework Core 3.0, 3.1 (5.0, 6.0)

EntityProjectionExpression(IEntityType, IDictionary<IProperty,ColumnExpression>, SqlExpression)

Source:
EntityProjectionExpression.cs

Creates a new instance of the EntityProjectionExpression class.

C#
public EntityProjectionExpression (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IDictionary<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Query.SqlExpressions.ColumnExpression> propertyExpressionMap, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression discriminatorExpression = default);

Parameters

entityType
IEntityType

The entity type to shape.

propertyExpressionMap
IDictionary<IProperty,ColumnExpression>

A dictionary of column expressions corresponding to properties of the entity type.

discriminatorExpression
SqlExpression

A SqlExpression to generate discriminator for each concrete entity type in hierarchy.

Applies to

Entity Framework Core 5.0
Toode Versioonid
Entity Framework Core 5.0

EntityProjectionExpression(IEntityType, IReadOnlyDictionary<IProperty,ColumnExpression>, SqlExpression)

Source:
EntityProjectionExpression.cs
Source:
EntityProjectionExpression.cs

Creates a new instance of the EntityProjectionExpression class.

C#
public EntityProjectionExpression (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IReadOnlyDictionary<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Query.SqlExpressions.ColumnExpression> propertyExpressionMap, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? discriminatorExpression = default);

Parameters

entityType
IEntityType

An entity type to shape.

propertyExpressionMap
IReadOnlyDictionary<IProperty,ColumnExpression>

A dictionary of column expressions corresponding to properties of the entity type.

discriminatorExpression
SqlExpression

A SqlExpression to generate discriminator for each concrete entity type in hierarchy.

Applies to

Entity Framework Core 7.0 ja Entity Framework Core 6.0
Toode Versioonid
Entity Framework Core 6.0, 7.0