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 否则为 。

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

适用于