语言

PropertiesConfigurationBuilder.HaveMaxLength(Int32) 方法

定义

配置可存储在此属性中的数据的最大长度。 只能在数组属性(包括 String 属性)上设置最大长度。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveMaxLength(int maxLength);
abstract member HaveMaxLength : int -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder
override this.HaveMaxLength : int -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder
Public Overridable Function HaveMaxLength (maxLength As Integer) As PropertiesConfigurationBuilder

参数

maxLength
Int32

属性中允许的数据的最大长度。

返回

同一个生成器实例,以便可以链接多个配置调用。

适用于