共用方式為


RelationalModelBuilderExtensions.HasMaxIdentifierLength 方法

定義

設定存放區識別碼允許的最大長度。

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

參數

modelBuilder
IConventionModelBuilder

模型產生器。

length
Nullable<Int32>

要設定的值。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於