MigrationBuilder.CreateSequence 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateSequence(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
生成 以 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)
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
生成 以 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
指示在达到最大值时序列是否会重新启动。
返回
一个生成器,允许将批注添加到操作中。
注解
有关详细信息和示例 ,请参阅数据库迁移 。