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

指示配置是否是使用数据注释指定的。

返回

配置的值。

适用于