SqlServerPropertyBuilderExtensions.ForSqlServerHasDefaultValue Method

Definition

Overloads

ForSqlServerHasDefaultValue(PropertyBuilder, Object)

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

ForSqlServerHasDefaultValue<TProperty>(PropertyBuilder<TProperty>, Object)

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

ForSqlServerHasDefaultValue(PropertyBuilder, Object)

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

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder ForSqlServerHasDefaultValue (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, object value);
static member ForSqlServerHasDefaultValue : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function ForSqlServerHasDefaultValue (propertyBuilder As PropertyBuilder, value As Object) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

value
Object

The default value of the column.

Returns

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

Applies to

ForSqlServerHasDefaultValue<TProperty>(PropertyBuilder<TProperty>, Object)

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

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> ForSqlServerHasDefaultValue<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, object value);
static member ForSqlServerHasDefaultValue : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function ForSqlServerHasDefaultValue(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), value As Object) 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.

value
Object

The default value of the column.

Returns

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

Applies to