共用方式為


IConventionProperty.SetIsNullable(Nullable<Boolean>, Boolean) 方法

定義

設定值,指出這個屬性是否可以包含 null

public void SetIsNullable (bool? nullable, bool fromDataAnnotation = false);
public bool? SetIsNullable (bool? nullable, bool fromDataAnnotation = false);
abstract member SetIsNullable : Nullable<bool> * bool -> unit
abstract member SetIsNullable : Nullable<bool> * bool -> Nullable<bool>
Public Sub SetIsNullable (nullable As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false)
Public Function SetIsNullable (nullable As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Boolean)

參數

nullable
Nullable<Boolean>

值,指出這個屬性是否可以包含 nullnull 將 重設為預設值。

fromDataAnnotation
Boolean

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

傳回

已設定的值。

適用於