語言

IConventionPropertyBuilder.CanSetMaxLength 方法

定義

回傳一個值,表示是否能從目前組態來源設定此屬性的最大資料長度。

public bool CanSetMaxLength(int? maxLength, bool fromDataAnnotation = false);
abstract member CanSetMaxLength : Nullable<int> * bool -> bool
Public Function CanSetMaxLength (maxLength As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

maxLength
Nullable<Int32>

該物業允許的最大資料長度。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 如果可以設定此特性允許的最大資料長度。

適用於