語言

LengthPropertyConfiguration.HasMaxLength(Nullable<Int32>) 方法

定義

設定屬性為指定的最大長度。

public System.Data.Entity.ModelConfiguration.Configuration.LengthPropertyConfiguration HasMaxLength(Nullable<int> value);
member this.HasMaxLength : Nullable<int> -> System.Data.Entity.ModelConfiguration.Configuration.LengthPropertyConfiguration
Public Function HasMaxLength (value As Nullable(Of Integer)) As LengthPropertyConfiguration

參數

value
Nullable<Int32>

該物業的最大長度。 設定 'null' 可移除屬性中的任何最大長度限制,資料庫欄位將使用預設長度。

傳回

同一個 LengthPropertyConfiguration 實例,這樣可以串接多個呼叫。

適用於