Share via


RelationalPrimitiveCollectionBuilderExtensions.HasComputedColumnSql Method

Definition

Overloads

HasComputedColumnSql(PrimitiveCollectionBuilder)

Configures the property to map to a computed column when targeting a relational database.

HasComputedColumnSql(PrimitiveCollectionBuilder, String)

Configures the property to map to a computed column when targeting a relational database.

HasComputedColumnSql(PrimitiveCollectionBuilder, String, Nullable<Boolean>)

Configures the property to map to a computed column when targeting a relational database.

HasComputedColumnSql<TProperty>(PrimitiveCollectionBuilder<TProperty>, String)

Configures the property to map to a computed column when targeting a relational database.

HasComputedColumnSql<TProperty>(PrimitiveCollectionBuilder<TProperty>, String, Nullable<Boolean>)

Configures the property to map to a computed column when targeting a relational database.

HasComputedColumnSql<TProperty>(PrimitiveCollectionBuilder<TProperty>)

Configures the property to map to a computed column when targeting a relational database.

HasComputedColumnSql(PrimitiveCollectionBuilder)

Source:
RelationalPrimitiveCollectionBuilderExtensions.cs
Source:
RelationalPrimitiveCollectionBuilderExtensions.cs

Configures the property to map to a computed column when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder HasComputedColumnSql (this Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder primitiveCollectionBuilder);
static member HasComputedColumnSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
<Extension()>
Public Function HasComputedColumnSql (primitiveCollectionBuilder As PrimitiveCollectionBuilder) As PrimitiveCollectionBuilder

Parameters

primitiveCollectionBuilder
PrimitiveCollectionBuilder

The builder for the property being configured.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

When called with no arguments, this method tells EF that a column is computed without needing to specify the actual SQL used to computed it. This can be useful when mapping EF to an existing database.

See Database default values for more information and examples.

Applies to

HasComputedColumnSql(PrimitiveCollectionBuilder, String)

Source:
RelationalPrimitiveCollectionBuilderExtensions.cs
Source:
RelationalPrimitiveCollectionBuilderExtensions.cs

Configures the property to map to a computed column when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder HasComputedColumnSql (this Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder primitiveCollectionBuilder, string? sql);
static member HasComputedColumnSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
<Extension()>
Public Function HasComputedColumnSql (primitiveCollectionBuilder As PrimitiveCollectionBuilder, sql As String) As PrimitiveCollectionBuilder

Parameters

primitiveCollectionBuilder
PrimitiveCollectionBuilder

The builder for the property being configured.

sql
String

The SQL expression that computes values for the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Database default values for more information and examples.

Applies to

HasComputedColumnSql(PrimitiveCollectionBuilder, String, Nullable<Boolean>)

Source:
RelationalPrimitiveCollectionBuilderExtensions.cs
Source:
RelationalPrimitiveCollectionBuilderExtensions.cs

Configures the property to map to a computed column when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder HasComputedColumnSql (this Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder primitiveCollectionBuilder, string? sql, bool? stored);
static member HasComputedColumnSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder * string * Nullable<bool> -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
<Extension()>
Public Function HasComputedColumnSql (primitiveCollectionBuilder As PrimitiveCollectionBuilder, sql As String, stored As Nullable(Of Boolean)) As PrimitiveCollectionBuilder

Parameters

primitiveCollectionBuilder
PrimitiveCollectionBuilder

The builder for the property being configured.

sql
String

The SQL expression that computes values for the column.

stored
Nullable<Boolean>

If true, the computed value is calculated on row modification and stored in the database like a regular column. If false, the value is computed when the value is read, and does not occupy any actual storage. null selects the database provider default.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Database default values for more information and examples.

Applies to

HasComputedColumnSql<TProperty>(PrimitiveCollectionBuilder<TProperty>, String)

Source:
RelationalPrimitiveCollectionBuilderExtensions.cs
Source:
RelationalPrimitiveCollectionBuilderExtensions.cs

Configures the property to map to a computed column when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> HasComputedColumnSql<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> primitiveCollectionBuilder, string? sql);
static member HasComputedColumnSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property>
<Extension()>
Public Function HasComputedColumnSql(Of TProperty) (primitiveCollectionBuilder As PrimitiveCollectionBuilder(Of TProperty), sql As String) As PrimitiveCollectionBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property being configured.

Parameters

primitiveCollectionBuilder
PrimitiveCollectionBuilder<TProperty>

The builder for the property being configured.

sql
String

The SQL expression that computes values for the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Database default values for more information and examples.

Applies to

HasComputedColumnSql<TProperty>(PrimitiveCollectionBuilder<TProperty>, String, Nullable<Boolean>)

Source:
RelationalPrimitiveCollectionBuilderExtensions.cs
Source:
RelationalPrimitiveCollectionBuilderExtensions.cs

Configures the property to map to a computed column when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> HasComputedColumnSql<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> primitiveCollectionBuilder, string? sql, bool? stored);
static member HasComputedColumnSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property> * string * Nullable<bool> -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property>
<Extension()>
Public Function HasComputedColumnSql(Of TProperty) (primitiveCollectionBuilder As PrimitiveCollectionBuilder(Of TProperty), sql As String, stored As Nullable(Of Boolean)) As PrimitiveCollectionBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property being configured.

Parameters

primitiveCollectionBuilder
PrimitiveCollectionBuilder<TProperty>

The builder for the property being configured.

sql
String

The SQL expression that computes values for the column.

stored
Nullable<Boolean>

If true, the computed value is calculated on row modification and stored in the database like a regular column. If false, the value is computed when the value is read, and does not occupy any actual storage. null selects the database provider default.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Database default values for more information and examples.

Applies to

HasComputedColumnSql<TProperty>(PrimitiveCollectionBuilder<TProperty>)

Source:
RelationalPrimitiveCollectionBuilderExtensions.cs
Source:
RelationalPrimitiveCollectionBuilderExtensions.cs

Configures the property to map to a computed column when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> HasComputedColumnSql<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> primitiveCollectionBuilder);
static member HasComputedColumnSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property> -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property>
<Extension()>
Public Function HasComputedColumnSql(Of TProperty) (primitiveCollectionBuilder As PrimitiveCollectionBuilder(Of TProperty)) As PrimitiveCollectionBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property being configured.

Parameters

primitiveCollectionBuilder
PrimitiveCollectionBuilder<TProperty>

The builder for the property being configured.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

When called with no arguments, this method tells EF that a column is computed without needing to specify the actual SQL used to computed it. This can be useful when mapping EF to an existing database.

See Database default values for more information and examples.

Applies to