语言

RuntimeProperty.IReadOnlyProperty.GetMaxLength 方法

定义

获取此属性中允许的最大数据长度。 例如,如果属性是 String ,则这是最大字符数。

[System.Diagnostics.DebuggerStepThrough]
int? IReadOnlyProperty.GetMaxLength();
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty.GetMaxLength : unit -> Nullable<int>
override this.Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty.GetMaxLength : unit -> Nullable<int>
Function GetMaxLength () As Nullable(Of Integer) Implements IReadOnlyProperty.GetMaxLength

返回

如果属性没有最大长度 -1 ,或者 null 未设置最大长度,则为最大长度。

实现

特性

适用于