Share via


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 如果可以设置存储标识符允许的最大长度,则为 。

注解

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

适用于