語言

MutablePropertyExtensions.SetMaxLength 方法

定義

設定此屬性允許的最大資料長度。 例如,若屬性為 String ',則為最大字元數。

public static void SetMaxLength(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, int? maxLength);
static member SetMaxLength : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Nullable<int> -> unit
<Extension()>
Public Sub SetMaxLength (property As IMutableProperty, maxLength As Nullable(Of Integer))

參數

property
IMutableProperty

設定最大長度的性質。

maxLength
Nullable<Int32>

此特性允許的最大資料長度。

適用於