語言

RelationalModelBuilderExtensions.CanSetMaxIdentifierLength 方法

定義

回傳一個值,表示是否可以設定儲存識別碼的最大長度。

public static bool CanSetMaxIdentifierLength(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, int? length, bool fromDataAnnotation = false);
static member CanSetMaxIdentifierLength : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int> * bool -> bool
<Extension()>
Public Function CanSetMaxIdentifierLength (modelBuilder As IConventionModelBuilder, length As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

modelBuilder
IConventionModelBuilder

模型建構器。

length
Nullable<Int32>

要設定的值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 是否可以設定商店識別碼允許的最大長度。

備註

更多資訊與範例請參閱 建模實體類型與關係 。

適用於