Share via


IConventionSequence 接口

定义

以一种形式表示模型中的数据库序列,该序列可在生成模型时发生改变。

public interface IConventionSequence : Microsoft.EntityFrameworkCore.Metadata.ISequence
public interface IConventionSequence : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.ISequence
public interface IConventionSequence : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlySequence
type IConventionSequence = interface
    interface ISequence
type IConventionSequence = interface
    interface ISequence
    interface IAnnotatable
    interface IConventionAnnotatable
type IConventionSequence = interface
    interface IReadOnlySequence
    interface IReadOnlyAnnotatable
    interface IConventionAnnotatable
Public Interface IConventionSequence
Implements ISequence
Public Interface IConventionSequence
Implements IConventionAnnotatable, ISequence
Public Interface IConventionSequence
Implements IConventionAnnotatable, IReadOnlySequence
实现

注解

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

属性

Builder

获取可用于配置此序列的生成器。

ClrType
已过时。.

Type获取序列返回的值的 。

(继承自 IReadOnlySequence)
IncrementBy

获取递增的量,以获取序列中的每个新值。

(继承自 IReadOnlySequence)
IsCyclic

获取一个值,该值指示当达到最大值时,序列是否会从开头重新开始。

(继承自 IReadOnlySequence)
IsInModel

指示此对象是否位于模型中,即尚未从模型中删除。

(继承自 IConventionAnnotatable)
Item[String]

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

(继承自 IReadOnlyAnnotatable)
MaxValue

获取序列支持的最大值,或者 null 如果未设置任何值,则为 。

(继承自 IReadOnlySequence)
MinValue

获取序列支持的最小值,或者 null 如果未设置任何值,则为 。

(继承自 IReadOnlySequence)
Model

IConventionModel获取定义此序列的 。

ModelSchema

获取序列的模型架构。 这是中指定的 HasSequence(ModelBuilder, String, String) ,也是要与 一起使用 FindSequence(IConventionModel, String, String)的 。

(继承自 IReadOnlySequence)
Name

获取数据库中序列的名称。

(继承自 IReadOnlySequence)
Schema

获取包含 序列的数据库架构。

(继承自 IReadOnlySequence)
StartValue

获取序列将启动的值。

(继承自 IReadOnlySequence)
Type

获取序列返回的值的类型。

(继承自 IReadOnlySequence)

方法

AddAnnotation(String, Object, Boolean)

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

(继承自 IConventionAnnotatable)
AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

向 对象添加批注。

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

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

(继承自 IAnnotatable)
AnnotationsToDebugString(Int32)

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

(继承自 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(继承自 IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

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

(继承自 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(继承自 IAnnotatable)
GetAnnotation(String)

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

(继承自 IReadOnlyAnnotatable)
GetAnnotations()

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

(继承自 IReadOnlyAnnotatable)
GetClrTypeConfigurationSource()
已过时。.

获取 的配置 ClrType源。

GetConfigurationSource()

获取此 IConventionSequence的配置源。

GetIncrementByConfigurationSource()

获取 的配置 IncrementBy源。

GetIsCyclicConfigurationSource()

获取 的配置 IsCyclic源。

GetMaxValueConfigurationSource()

获取 的配置 MaxValue源。

GetMinValueConfigurationSource()

返回 的配置 MinValue源。

GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

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

(继承自 IAnnotatable)
GetRuntimeAnnotations()

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

(继承自 IAnnotatable)
GetStartValueConfigurationSource()

返回 的配置 StartValue源。

GetTypeConfigurationSource()

获取 的配置 Type源。

RemoveAnnotation(String)

从此对象中删除具有给定名称的批注。

(继承自 IConventionAnnotatable)
RemoveRuntimeAnnotation(String)

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

(继承自 IAnnotatable)
SetAnnotation(String, Object, Boolean)

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

(继承自 IConventionAnnotatable)
SetClrType(Type, Boolean)
已过时。.

Type设置序列返回的值的 。

SetIncrementBy(Nullable<Int32>, Boolean)

设置递增的量以获取序列中的每个新值。

SetIsCyclic(Nullable<Boolean>, Boolean)

设置当达到最大值时,序列是否将从头开始。

SetMaxValue(Nullable<Int64>, Boolean)

设置序列支持的最大值。

SetMinValue(Nullable<Int64>, Boolean)

设置序列支持的最小值。

SetOrRemoveAnnotation(String, Object, Boolean)

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

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

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

(继承自 IAnnotatable)
SetStartValue(Nullable<Int64>, Boolean)

设置序列将开始的值。

SetType(Type, Boolean)

Type设置序列返回的值的 。

ToDebugString(MetadataDebugStringOptions, Int32)

创建给定元数据的可读表示形式。

警告:不要依赖于返回的字符串的格式。 它仅用于调试,可能会在发布之间任意更改。

(继承自 IReadOnlySequence)

扩展方法

AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

向 对象添加批注。

GetAnnotation(IConventionAnnotatable, String)

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

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

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

AnnotationsToDebugString(IAnnotatable, Int32)

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

GetAnnotation(IAnnotatable, String)

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

ToDebugString(ISequence, MetadataDebugStringOptions, Int32)

创建给定元数据的可读表示形式。

警告:不要依赖于返回的字符串的格式。 它仅用于调试,可能会在发布之间任意更改。

适用于