共用方式為


LengthColumnConfiguration.HasMaxLength(Nullable<Int32>) 方法

定義

設定此資料行具有指定的最大長度。

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

參數

value
Nullable<Int32>

資料行的最大長度。 將值設定為 null 將會移除資料行的任何最大長度限制,而預設長度將用於資料庫資料行。

傳回

相同的 LengthColumnConfiguration 實例,以便鏈結多個呼叫。

適用於