Share via


SqlServerPropertyBuilderExtensions.ForSqlServerHasDefaultValueSql Method

Definition

Overloads

ForSqlServerHasDefaultValueSql(PropertyBuilder, String)

Configures the default value expression for the column that the property maps to when targeting SQL Server.

ForSqlServerHasDefaultValueSql<TProperty>(PropertyBuilder<TProperty>, String)

Configures the default value expression for the column that the property maps to when targeting SQL Server.

ForSqlServerHasDefaultValueSql(PropertyBuilder, String)

Configures the default value expression for the column that the property maps to when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder ForSqlServerHasDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string sql);
static member ForSqlServerHasDefaultValueSql : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function ForSqlServerHasDefaultValueSql (propertyBuilder As PropertyBuilder, sql As String) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

sql
String

The SQL expression for the default value of the column.

Returns

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

Applies to

ForSqlServerHasDefaultValueSql<TProperty>(PropertyBuilder<TProperty>, String)

Configures the default value expression for the column that the property maps to when targeting SQL Server.

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

Type Parameters

TProperty

The type of the property being configured.

Parameters

propertyBuilder
PropertyBuilder<TProperty>

The builder for the property being configured.

sql
String

The SQL expression for the default value of the column.

Returns

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

Applies to