語言

IConventionComplexProperty.SetIsNullable 方法

定義

設定一個值,表示此性質是否能包含 null。

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

參數

nullable
Nullable<Boolean>

一個表示此性質是否能包含 null的值。 null 重置為預設值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

設定值。

適用於