共用方式為


SqlServerModelBuilderExtensions.ForSqlServerUseSequenceHiLo 方法

定義

警告

Use UseHiLo

將模型設定為使用序列型 hi-lo 模式,以在以 SQL Server 為目標時,產生標示為 OnAdd 之索引鍵屬性的值。

public static Microsoft.EntityFrameworkCore.ModelBuilder ForSqlServerUseSequenceHiLo (this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, string name = default, string schema = default);
[System.Obsolete("Use UseHiLo")]
public static Microsoft.EntityFrameworkCore.ModelBuilder ForSqlServerUseSequenceHiLo (this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, string name = default, string schema = default);
static member ForSqlServerUseSequenceHiLo : Microsoft.EntityFrameworkCore.ModelBuilder * string * string -> Microsoft.EntityFrameworkCore.ModelBuilder
[<System.Obsolete("Use UseHiLo")>]
static member ForSqlServerUseSequenceHiLo : Microsoft.EntityFrameworkCore.ModelBuilder * string * string -> Microsoft.EntityFrameworkCore.ModelBuilder
<Extension()>
Public Function ForSqlServerUseSequenceHiLo (modelBuilder As ModelBuilder, Optional name As String = Nothing, Optional schema As String = Nothing) As ModelBuilder

參數

modelBuilder
ModelBuilder

模型產生器。

name
String

序列的名稱。

schema
String

序列的架構。

傳回

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

屬性

適用於