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>

此屬性中允許的資料長度上限。

適用於