SqlServerPropertyBuilderExtensions.ForSqlServerHasDefaultValue 方法

定義

多載

ForSqlServerHasDefaultValue(PropertyBuilder, Object)

設定以目標SQL Server為目標時,屬性所對應之資料行的預設值。

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

設定以目標SQL Server為目標時,屬性所對應之資料行的預設值。

ForSqlServerHasDefaultValue(PropertyBuilder, Object)

設定以目標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

參數

propertyBuilder
PropertyBuilder

要設定之屬性的產生器。

value
Object

資料行的預設值。

傳回

相同的產生器實例,以便鏈結多個呼叫。

適用於

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

設定以目標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)

類型參數

TProperty

正在設定之屬性的型別。

參數

propertyBuilder
PropertyBuilder<TProperty>

要設定之屬性的產生器。

value
Object

資料行的預設值。

傳回

相同的產生器實例,以便鏈結多個呼叫。

適用於