SqlServerPropertyBuilderExtensions.HasHiLoSequence 方法

定义

将用于 hi-lo 模式的数据库序列配置为在面向SQL Server时为键属性生成值。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSequenceBuilder HasHiLoSequence (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string name, string schema, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSequenceBuilder? HasHiLoSequence (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string? name, string? schema, bool fromDataAnnotation = false);
static member HasHiLoSequence : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * string * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSequenceBuilder
<Extension()>
Public Function HasHiLoSequence (propertyBuilder As IConventionPropertyBuilder, name As String, schema As String, Optional fromDataAnnotation As Boolean = false) As IConventionSequenceBuilder

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

name
String

序列的名称。

schema
String

序列的架构。

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

用于进一步配置序列的生成器。

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于