语言

SqlServerPropertyBuilderExtensions 类

定义

SQL Server特定扩展方法。PropertyBuilder

public static class SqlServerPropertyBuilderExtensions
[System.Runtime.CompilerServices.Nullable(0)]
public static class SqlServerPropertyBuilderExtensions
type SqlServerPropertyBuilderExtensions = class
[<System.Runtime.CompilerServices.Nullable(0)>]
type SqlServerPropertyBuilderExtensions = class
Public Module SqlServerPropertyBuilderExtensions
继承
SqlServerPropertyBuilderExtensions
特性

注解

有关详细信息和示例,请参阅建模实体类型和关系,以及使用 EF Core 访问SQL Server和Azure SQL数据库。

方法

名称 说明
CanSetDefaultValue(IConventionPropertyBuilder, Object, String, Boolean)

返回一个值,该值指示是否可以将给定值设置为列的默认值。

CanSetDefaultValueSql(IConventionPropertyBuilder, String, String, Boolean)

返回一个值,该值指示是否可以为列设置给定的默认值表达式。

CanSetHiLoSequence(IConventionPropertyBuilder, String, String, Boolean)

返回一个值,该值指示是否可以为 hi-lo 序列设置给定名称和架构。

CanSetIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

返回一个值,该值指示是否可以将给定值设置为SQL Server IDENTITY 的增量。

CanSetIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, StoreObjectIdentifier, Boolean)

返回一个值,该值指示是否可以将给定值设置为特定表的 SQL Server IDENTITY 的增量。

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

返回一个值,该值指示是否可以将给定值设置为 SQL Server IDENTITY 的种子。

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

返回一个值,该值指示是否可以将给定值设置为 SQL Server IDENTITY 的种子。

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, StoreObjectIdentifier, Boolean)

返回一个值,该值指示是否可以将给定值设置为特定表的 SQL Server IDENTITY 的种子。

CanSetIsHidden(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

返回一个值,该值指示是否可以使用SQL ServerHIDDEN标志配置属性的列。

CanSetIsSparse(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

返回一个值,该值指示在定位SQL Server时是否可以将属性的列配置为稀疏。

CanSetSequence(IConventionPropertyBuilder, String, String, Boolean)

返回一个值,该值指示是否可以为键值生成序列设置给定名称和架构。

CanSetValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, Boolean)

返回一个值,该值指示是否可以将给定值设置为值生成策略。

CanSetValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, StoreObjectIdentifier, Boolean)

返回一个值,该值指示是否可以将给定值设置为特定表的值生成策略。

ForSqlServerHasColumnName(PropertyBuilder, String)

配置属性在定位SQL Server时映射到的列。

ForSqlServerHasColumnName<TProperty>(PropertyBuilder<TProperty>, String)

配置属性在定位SQL Server时映射到的列。

ForSqlServerHasColumnType(PropertyBuilder, String)

配置属性在定位SQL Server时映射到的列的数据类型。 这应该是完整的类型名称,包括精度、刻度、长度等。

ForSqlServerHasColumnType<TProperty>(PropertyBuilder<TProperty>, String)

配置属性在定位SQL Server时映射到的列的数据类型。 这应该是完整的类型名称,包括精度、刻度、长度等。

ForSqlServerHasComputedColumnSql(PropertyBuilder, String)

将属性配置为在定位SQL Server时映射到计算列。

ForSqlServerHasComputedColumnSql<TProperty>(PropertyBuilder<TProperty>, String)

将属性配置为在定位SQL Server时映射到计算列。

ForSqlServerHasDefaultValue(PropertyBuilder, Object)

配置属性在定位SQL Server时映射到的列的默认值。

ForSqlServerHasDefaultValue<TProperty>(PropertyBuilder<TProperty>, Object)

配置属性在定位SQL Server时映射到的列的默认值。

ForSqlServerHasDefaultValueSql(PropertyBuilder, String)

配置属性在定位SQL Server时映射到的列的默认值表达式。

ForSqlServerHasDefaultValueSql<TProperty>(PropertyBuilder<TProperty>, String)

配置属性在定位SQL Server时映射到的列的默认值表达式。

ForSqlServerHasHiLoSequence(IConventionPropertyBuilder, String, String, Boolean)
已过时.

配置用于 hi-lo 模式的数据库序列,以便在针对SQL Server时为键属性生成值。

ForSqlServerHasIdentityIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)
已过时.

为 SQL Server IDENTITY 配置增量。

ForSqlServerHasIdentitySeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)
已过时.

为 SQL Server IDENTITY 配置种子。

ForSqlServerHasValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, Boolean)
已过时.

针对SQL Server时,配置键属性的值生成策略。

ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)
已过时.

将键属性配置为使用基于序列的 hi-lo 模式在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

ForSqlServerUseSequenceHiLo<TProperty>(PropertyBuilder<TProperty>, String, String)
已过时.

将键属性配置为使用基于序列的 hi-lo 模式在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

HasDefaultValue(IConventionPropertyBuilder, Object, String, Boolean)

配置属性在定位SQL Server时映射到的列的默认值。

HasDefaultValue(PropertyBuilder, Object, String)

配置属性在定位SQL Server时映射到的列的默认值。

HasDefaultValue<TProperty>(PropertyBuilder<TProperty>, Object, String)

配置属性在定位SQL Server时映射到的列的默认值。

HasDefaultValueSql(IConventionPropertyBuilder, String, String, Boolean)

配置属性在定位SQL Server时映射到的列的默认值表达式。

HasDefaultValueSql(PropertyBuilder, String, String)

配置属性在定位SQL Server时映射到的列的默认值表达式。

HasDefaultValueSql<TProperty>(PropertyBuilder<TProperty>, String, String)

配置属性在定位SQL Server时映射到的列的默认值表达式。

HasHiLoSequence(IConventionPropertyBuilder, String, String, Boolean)

配置用于 hi-lo 模式的数据库序列,以便在针对SQL Server时为键属性生成值。

HasIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

为 SQL Server IDENTITY 配置增量。

HasIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, StoreObjectIdentifier, Boolean)

为特定表配置SQL Server IDENTITY 的增量。

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

为 SQL Server IDENTITY 配置种子。

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

为 SQL Server IDENTITY 配置种子。

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, StoreObjectIdentifier, Boolean)

为特定表配置 SQL Server IDENTITY 的种子。

HasSequence(IConventionPropertyBuilder, String, String, Boolean)

配置用于键值生成模式的数据库序列,以便在针对SQL Server时为键属性生成值。

HasValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, Boolean)

针对SQL Server时,配置键属性的值生成策略。

HasValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, StoreObjectIdentifier, Boolean)

针对特定表的SQL Server时,为键属性配置值生成策略。

IsHidden(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

配置属性的列是否使用SQL ServerHIDDEN标志定义,这会从结果中SELECT *排除该列。 这适用于生成的列,例如临时表句点列。

IsSparse(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

配置在以SQL Server为目标时是否将属性的列创建为稀疏。

IsSparse(PropertyBuilder, Boolean)

配置在以SQL Server为目标时是否将属性的列创建为稀疏。

IsSparse<TProperty>(PropertyBuilder<TProperty>, Boolean)

配置在以SQL Server为目标时是否将属性的列创建为稀疏。

UseHiLo(PropertyBuilder, String, String)

将键属性配置为使用基于序列的 hi-lo 模式在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseHiLo<TProperty>(PropertyBuilder<TProperty>, String, String)

将键属性配置为使用基于序列的 hi-lo 模式在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseIdentityColumn(ColumnBuilder, Int64, Int32)

将键列配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseIdentityColumn(PropertyBuilder, Int32, Int32)

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseIdentityColumn(PropertyBuilder, Int64, Int32)

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseIdentityColumn<TProperty>(ColumnBuilder<TProperty>, Int64, Int32)

将键列配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseIdentityColumn<TProperty>(PropertyBuilder<TProperty>, Int32, Int32)

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseIdentityColumn<TProperty>(PropertyBuilder<TProperty>, Int64, Int32)

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseSequence(PropertyBuilder, String, String)

将键属性配置为使用基于序列的键值生成模式在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseSequence<TProperty>(PropertyBuilder<TProperty>, String, String)

将键属性配置为使用基于序列的键值生成模式在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseSqlServerIdentityColumn(PropertyBuilder, Int32, Int32)
已过时.

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseSqlServerIdentityColumn(PropertyBuilder)

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseSqlServerIdentityColumn<TProperty>(PropertyBuilder<TProperty>, Int32, Int32)
已过时.

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

UseSqlServerIdentityColumn<TProperty>(PropertyBuilder<TProperty>)

将密钥属性配置为使用 SQL Server IDENTITY 功能在面向SQL Server时为新实体生成值。 此方法将属性设置为 OnAdd.

适用于