SqlServerPropertyBuilderExtensions.UseHiLo 方法

定義

多載

UseHiLo(PropertyBuilder, String, String)

設定索引鍵屬性,以在目標為SQL Server時,使用序列型 hi-lo 模式來產生新實體的值。 這個方法會將 屬性設定為 OnAdd

UseHiLo<TProperty>(PropertyBuilder<TProperty>, String, String)

設定索引鍵屬性,以在目標為SQL Server時,使用序列型 hi-lo 模式來產生新實體的值。 這個方法會將 屬性設定為 OnAdd

UseHiLo(PropertyBuilder, String, String)

設定索引鍵屬性,以在目標為SQL Server時,使用序列型 hi-lo 模式來產生新實體的值。 這個方法會將 屬性設定為 OnAdd

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseHiLo (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string name = default, string schema = default);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseHiLo (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string? name = default, string? schema = default);
static member UseHiLo : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function UseHiLo (propertyBuilder As PropertyBuilder, Optional name As String = Nothing, Optional schema As String = Nothing) As PropertyBuilder

參數

propertyBuilder
PropertyBuilder

要設定之屬性的產生器。

name
String

序列的名稱。

schema
String

序列的架構。

傳回

相同的產生器實例,以便鏈結多個呼叫。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及使用 EF Core 存取SQL Server和Azure SQL資料庫

適用於

UseHiLo<TProperty>(PropertyBuilder<TProperty>, String, String)

設定索引鍵屬性,以在目標為SQL Server時,使用序列型 hi-lo 模式來產生新實體的值。 這個方法會將 屬性設定為 OnAdd

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseHiLo<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string name = default, string schema = default);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseHiLo<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string? name = default, string? schema = default);
static member UseHiLo : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function UseHiLo(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), Optional name As String = Nothing, Optional schema As String = Nothing) As PropertyBuilder(Of TProperty)

類型參數

TProperty

正在設定之屬性的型別。

參數

propertyBuilder
PropertyBuilder<TProperty>

要設定之屬性的產生器。

name
String

序列的名稱。

schema
String

序列的架構。

傳回

相同的產生器實例,以便鏈結多個呼叫。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及使用 EF Core 存取SQL Server和Azure SQL資料庫

適用於