ModelMetadata.ConvertEmptyStringToNull 属性

定义

获取或设置一个值,该值确定在窗体中提交的空字符串是否应转换为 nullGets or sets a value that determines whether empty strings that are submitted in forms should be converted to null.

public:
 virtual property bool ConvertEmptyStringToNull { bool get(); void set(bool value); };
public virtual bool ConvertEmptyStringToNull { get; set; }
member this.ConvertEmptyStringToNull : bool with get, set
Public Overridable Property ConvertEmptyStringToNull As Boolean

属性值

Boolean

如果空字符串应当转换为 true,则为 null;否则为 falsetrue if empty strings should be converted to null; otherwise, false. 默认值为 trueThe default value is true.

适用于