共用方式為


StringPropertyConfiguration.HasMaxLength(Nullable<Int32>) 方法

定義

設定此屬性具有指定的最大長度。

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

參數

value
Nullable<Int32>

此屬性的最大長度。 設定 'null' 會從 屬性中移除任何最大長度限制,而預設長度將用於資料庫資料行。

傳回

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

適用於