LengthPropertyConfiguration.HasMaxLength(Nullable<Int32>) 方法

定义

将属性配置为具有指定的最大长度。

public System.Data.Entity.ModelConfiguration.Configuration.LengthPropertyConfiguration HasMaxLength (Nullable<int> value);
member this.HasMaxLength : Nullable<int> -> System.Data.Entity.ModelConfiguration.Configuration.LengthPropertyConfiguration
Public Function HasMaxLength (value As Nullable(Of Integer)) As LengthPropertyConfiguration

参数

value
Nullable<Int32>

属性的最大长度。 设置“null”将从 属性中删除任何最大长度限制,数据库列将使用默认长度。

返回

相同的 LengthPropertyConfiguration 实例,以便可以链接多个调用。

适用于