MigrationBuilder.CreateSequence 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
CreateSequence(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
CreateSequenceOperation建置 以建立新的序列。
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence (string name, string schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence (string name, string? schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
abstract member CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
override this.CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
Public Overridable Function CreateSequence (name As String, Optional schema As String = Nothing, Optional startValue As Long = 1, Optional incrementBy As Integer = 1, Optional minValue As Nullable(Of Long) = Nothing, Optional maxValue As Nullable(Of Long) = Nothing, Optional cyclic As Boolean = false) As OperationBuilder(Of CreateSequenceOperation)
參數
- name
- String
序列名稱。
- schema
- String
包含序列的架構,或使用 null
預設架構。
- startValue
- Int64
序列開始的值,預設為 1。
- incrementBy
- Int32
在序列中產生下一個值時要遞增的數量,預設值為 1。
- cyclic
- Boolean
指出當達到最大值時,序列是否會重新開機。
傳回
允許將批註加入至作業的產生器。
備註
如需詳細資訊和範例 ,請參閱資料庫移轉 。
適用於
CreateSequence<T>(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
CreateSequenceOperation建置 以建立新的序列。
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence<T> (string name, string schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence<T> (string name, string? schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
abstract member CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
override this.CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
Public Overridable Function CreateSequence(Of T) (name As String, Optional schema As String = Nothing, Optional startValue As Long = 1, Optional incrementBy As Integer = 1, Optional minValue As Nullable(Of Long) = Nothing, Optional maxValue As Nullable(Of Long) = Nothing, Optional cyclic As Boolean = false) As OperationBuilder(Of CreateSequenceOperation)
類型參數
- T
序列所產生值的 CLR 型別。
參數
- name
- String
序列名稱。
- schema
- String
包含序列的架構,或使用 null
預設架構。
- startValue
- Int64
序列開始的值,預設為 1。
- incrementBy
- Int32
在序列中產生下一個值時要遞增的數量,預設值為 1。
- cyclic
- Boolean
指出當達到最大值時,序列是否會重新開機。
傳回
允許將批註加入至作業的產生器。
備註
如需詳細資訊和範例 ,請參閱資料庫移轉 。