SqlServerModelAnnotations 类

定义

通过 SqlServer(IMutableModel)访问的关系特定注释的属性。

public class SqlServerModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations, Microsoft.EntityFrameworkCore.Metadata.ISqlServerModelAnnotations
type SqlServerModelAnnotations = class
    inherit RelationalModelAnnotations
    interface ISqlServerModelAnnotations
    interface IRelationalModelAnnotations
Public Class SqlServerModelAnnotations
Inherits RelationalModelAnnotations
Implements ISqlServerModelAnnotations
继承
SqlServerModelAnnotations
实现

构造函数

名称 说明
SqlServerModelAnnotations(IModel)

为给定 IModel的注释构造 实例。

SqlServerModelAnnotations(RelationalAnnotations)

构造由给定批注帮助程序表示的 IModel 的注释的 实例。

字段

名称 说明
DefaultHiLoSequenceName

与 一起使用的序列的默认名称 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

ProviderFullAnnotationNames

通过 SqlServer(IMutableModel)访问的关系特定注释的属性。

(继承自 RelationalModelAnnotations)

属性

名称 说明
Annotations

表示 RelationalAnnotations 要批注的 的 IModel 帮助程序。

(继承自 RelationalModelAnnotations)
DatabaseName

通过 SqlServer(IMutableModel)访问的关系特定注释的属性。

(继承自 RelationalModelAnnotations)
DbFunctions

模型中包含的所有 IDbFunction

(继承自 RelationalModelAnnotations)
DefaultSchema

要用于模型的默认架构;如果未显式设置, null 则为 。

(继承自 RelationalModelAnnotations)
HiLoSequenceName

获取或设置要与 一起使用的序列名称 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

HiLoSequenceSchema

获取或设置序列要使用的架构 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

MaxIdentifierLength

存储标识符允许的最大长度。

(继承自 RelationalModelAnnotations)
Model

IModel 批注的 。

(继承自 RelationalModelAnnotations)
Sequences

模型中包含的所有 ISequence

(继承自 RelationalModelAnnotations)
ValueGenerationStrategy

SqlServerValueGenerationStrategy 用于模型中键的属性的 ,除非属性显式设置了不同的策略。

方法

名称 说明
FindDbFunction(MethodInfo)

查找 IDbFunction 映射到给定 MethodInfo表示的方法的 。

(继承自 RelationalModelAnnotations)
FindSequence(String, String)

查找 ISequence 具有给定名称的 。

(继承自 RelationalModelAnnotations)
GetOrAddDbFunction(MethodInfo)

返回映射到给定方法的现有 Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction ,或创建映射到方法的新函数。

(继承自 RelationalModelAnnotations)
GetOrAddSequence(String, String)

返回给定架构中具有给定名称的现有 IMutableSequence ,或使用给定名称和架构创建一个新序列。

(继承自 RelationalModelAnnotations)
SetDatabaseName(String)

通过 SqlServer(IMutableModel)访问的关系特定注释的属性。

(继承自 RelationalModelAnnotations)
SetDefaultSchema(String)

尝试使用正在使用 DefaultSchema 的 语义 RelationalAnnotations 设置 。

(继承自 RelationalModelAnnotations)
SetHiLoSequenceName(String)

尝试设置序列名称以用于 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

SetHiLoSequenceSchema(String)

尝试设置序列的架构,以便与 一起使用 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

SetMaxIdentifierLength(Nullable<Int32>)

尝试使用正在使用 MaxIdentifierLength 的 语义 RelationalAnnotations 设置 。

(继承自 RelationalModelAnnotations)
SetValueGenerationStrategy(Nullable<SqlServerValueGenerationStrategy>)

尝试设置 SqlServerValueGenerationStrategy 要用于模型中键的属性的 。

显式接口实现

名称 说明
IRelationalModelAnnotations.FindSequence(String, String)

查找 ISequence 具有给定名称的 。

(继承自 RelationalModelAnnotations)
IRelationalModelAnnotations.Sequences

模型中包含的所有 ISequence

(继承自 RelationalModelAnnotations)

适用于