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.

C#
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder ForSqlServerHasDefaultValue (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, object value);

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

Entity Framework Core 1.1 and Entity Framework Core 1.0
Product Versions
Entity Framework Core 1.0, 1.1

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

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

C#
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> ForSqlServerHasDefaultValue<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, object value);

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

Entity Framework Core 1.1 and Entity Framework Core 1.0
Product Versions
Entity Framework Core 1.0, 1.1