CreateSequenceOperation 类

定义

用于 MigrationOperation 创建新序列的 。

public class CreateSequenceOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
public class CreateSequenceOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.SequenceOperation
[System.Diagnostics.DebuggerDisplay("CREATE SEQUENCE {Name}")]
public class CreateSequenceOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.SequenceOperation
type CreateSequenceOperation = class
    inherit MigrationOperation
type CreateSequenceOperation = class
    inherit SequenceOperation
[<System.Diagnostics.DebuggerDisplay("CREATE SEQUENCE {Name}")>]
type CreateSequenceOperation = class
    inherit SequenceOperation
Public Class CreateSequenceOperation
Inherits MigrationOperation
Public Class CreateSequenceOperation
Inherits SequenceOperation
继承
CreateSequenceOperation
继承
继承
属性

注解

有关详细信息和示例 ,请参阅数据库迁移

构造函数

CreateSequenceOperation()

用于 MigrationOperation 创建新序列的 。

属性

ClrType

从序列返回的值的 CLR Type

IncrementBy

用于 MigrationOperation 创建新序列的 。

IncrementBy

在序列中生成下一个值时要递增的量,默认值为 1。

(继承自 SequenceOperation)
IsCyclic

用于 MigrationOperation 创建新序列的 。

IsCyclic

指示在达到最大值时序列是否会重新启动。

(继承自 SequenceOperation)
IsDestructiveChange

指示操作是否可能导致数据库中的数据丢失。

(继承自 MigrationOperation)
IsReadOnly

指示当前对象是否为只读对象。

(继承自 AnnotatableBase)
Item[String]

获取具有给定名称的值批注,如果不存在,则返回 null

(继承自 Annotatable)
MaxValue

用于 MigrationOperation 创建新序列的 。

MaxValue

序列的最大值,如果未指定, null 则为 。

(继承自 SequenceOperation)
MinValue

用于 MigrationOperation 创建新序列的 。

MinValue

序列的最小值,如果未指定, null 则为 。

(继承自 SequenceOperation)
Name

序列的名称。

Schema

包含序列的架构;如果应使用默认架构, null 则为 。

StartValue

序列将开始计数的值,默认值为 1。

方法

AddAnnotation(String, Annotation)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 Annotatable)
AddAnnotation(String, Object)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 Annotatable)
AddAnnotations(IEnumerable<IAnnotation>)

向此对象添加批注。

(继承自 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

向此对象添加批注。

(继承自 AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

向此对象添加运行时批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 AnnotatableBase)
AddRuntimeAnnotation(String, Object)

向此对象添加运行时批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

向此对象添加运行时批注。

(继承自 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

向此对象添加运行时批注。

(继承自 AnnotatableBase)
CreateAnnotation(String, Object)

创建新批注。

(继承自 Annotatable)
CreateRuntimeAnnotation(String, Object)

创建新的运行时批注。

(继承自 AnnotatableBase)
EnsureMutable()

如果模型为只读,则引发 。

(继承自 Annotatable)
EnsureReadOnly()

如果模型不是只读的,则引发 。

(继承自 Annotatable)
FindAnnotation(String)

获取具有给定名称的批注,如果不存在,则返回 null

(继承自 Annotatable)
FindRuntimeAnnotation(String)

获取具有给定名称的运行时注释,如果不存在,则返回 null

(继承自 AnnotatableBase)
GetAnnotation(String)

获取具有给定名称的批注,如果不存在,则引发该批注。

(继承自 AnnotatableBase)
GetAnnotations()

获取当前 对象上的所有注释。

(继承自 Annotatable)
GetOrAddAnnotation(String, Object)

向此对象添加批注,或返回现有批注(如果已存在具有指定名称的注释)。

(继承自 Annotatable)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

获取具有给定名称的运行时注释的值,如果不存在,则添加该值。

(继承自 AnnotatableBase)
GetRuntimeAnnotations()

获取当前 对象上的所有运行时注释。

(继承自 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

在设置或删除批注时调用。

(继承自 Annotatable)
RemoveAnnotation(String)

从此 对象中删除给定的批注。

(继承自 Annotatable)
RemoveRuntimeAnnotation(String)

从此 对象中删除给定的运行时批注。

(继承自 AnnotatableBase)
SetAnnotation(String, Annotation)

设置存储在给定键下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 Annotatable)
SetAnnotation(String, Annotation, Annotation)

设置存储在给定键下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 Annotatable)
SetAnnotation(String, Object)

设置存储在给定键下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 Annotatable)
SetRuntimeAnnotation(String, Annotation, Annotation)

设置存储在给定键下的运行时注释。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 AnnotatableBase)
SetRuntimeAnnotation(String, Object)

设置存储在给定键下的运行时注释。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 AnnotatableBase)

显式接口实现

IAnnotatable.AddRuntimeAnnotation(String, Object)

向此对象添加运行时批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 AnnotatableBase)
IAnnotatable.FindAnnotation(String)

获取具有给定名称的批注,如果不存在,则返回 null。

(继承自 Annotatable)
IAnnotatable.FindRuntimeAnnotation(String)

获取具有给定名称的运行时注释,如果不存在,则返回 null

(继承自 AnnotatableBase)
IAnnotatable.GetAnnotations()

获取当前 对象上的所有注释。

(继承自 Annotatable)
IAnnotatable.GetRuntimeAnnotations()

获取当前 对象上的所有运行时注释。

(继承自 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

从此 对象中删除给定的运行时批注。

(继承自 AnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

设置存储在给定键下的运行时注释。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 AnnotatableBase)
IMutableAnnotatable.AddAnnotation(String, Object)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 Annotatable)
IMutableAnnotatable.RemoveAnnotation(String)

从此 对象中删除给定的批注。

(继承自 Annotatable)
IMutableAnnotatable.SetOrRemoveAnnotation(String, Object)

设置存储在给定名称下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。 如果 null 提供了 ,则删除现有批注。

(继承自 Annotatable)
IReadOnlyAnnotatable.FindAnnotation(String)

获取具有给定名称的批注,如果不存在,则返回 null

(继承自 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

获取当前 对象上的所有注释。

(继承自 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

获取具有给定名称的批注的值,如果不存在,则返回 null

(继承自 AnnotatableBase)

扩展方法

AnnotationsToDebugString(IAnnotatable, Int32)

获取对象上声明的所有注释的调试字符串。

GetAnnotation(IAnnotatable, String)

获取具有给定名称的批注,如果不存在,则引发该批注。

AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>)

向 对象添加批注。

GetAnnotation(IMutableAnnotatable, String)

获取具有给定名称的批注,如果不存在,则引发该批注。

GetOrAddAnnotation(IMutableAnnotatable, String, String)

获取具有给定键的现有批注,或添加新批注(如果不存在)。

SetOrRemoveAnnotation(IMutableAnnotatable, String, Object)

设置存储在给定名称下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。 如果 null 提供了 ,则删除现有批注。

适用于