RelationalPropertyExtensions.SetDefaultValueSql 方法

定義

多載

SetDefaultValueSql(IMutableProperty, String)

設定當做這個屬性所對應之資料行預設值的 SQL 運算式。

SetDefaultValueSql(IConventionProperty, String, Boolean)

設定當做這個屬性所對應之資料行預設值的 SQL 運算式。

SetDefaultValueSql(IMutableProperty, String)

設定當做這個屬性所對應之資料行預設值的 SQL 運算式。

public static void SetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string value);
public static void SetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string? value);
static member SetDefaultValueSql : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * string -> unit
<Extension()>
Public Sub SetDefaultValueSql (property As IMutableProperty, value As String)

參數

property
IMutableProperty

屬性。

value
String

要設定的值。

適用於

SetDefaultValueSql(IConventionProperty, String, Boolean)

設定當做這個屬性所對應之資料行預設值的 SQL 運算式。

public static void SetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string value, bool fromDataAnnotation = false);
public static string SetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string value, bool fromDataAnnotation = false);
public static string? SetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string? value, bool fromDataAnnotation = false);
static member SetDefaultValueSql : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> unit
static member SetDefaultValueSql : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> string
<Extension()>
Public Sub SetDefaultValueSql (property As IConventionProperty, value As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetDefaultValueSql (property As IConventionProperty, value As String, Optional fromDataAnnotation As Boolean = false) As String

參數

property
IConventionProperty

屬性。

value
String

要設定的值。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

已設定的值。

適用於