SqlServerPropertyBuilderExtensions.CanSetValueGenerationStrategy 方法

定义

重载

CanSetValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, Boolean)

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

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

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

CanSetValueGenerationStrategy(IConventionPropertyBuilder, Nullable<SqlServerValueGenerationStrategy>, Boolean)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

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

public static bool CanSetValueGenerationStrategy (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? valueGenerationStrategy, bool fromDataAnnotation = false);
static member CanSetValueGenerationStrategy : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy> * bool -> bool
<Extension()>
Public Function CanSetValueGenerationStrategy (propertyBuilder As IConventionPropertyBuilder, valueGenerationStrategy As Nullable(Of SqlServerValueGenerationStrategy), Optional fromDataAnnotation As Boolean = false) As Boolean

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

valueGenerationStrategy
Nullable<SqlServerValueGenerationStrategy>

价值生成策略。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

true 如果给定值可以设置为默认值生成策略,则为 。

注解

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

适用于

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

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

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

public static bool CanSetValueGenerationStrategy (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? valueGenerationStrategy, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject, bool fromDataAnnotation = false);
static member CanSetValueGenerationStrategy : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy> * StoreObjectIdentifier * bool -> bool
<Extension()>
Public Function CanSetValueGenerationStrategy (propertyBuilder As IConventionPropertyBuilder, valueGenerationStrategy As Nullable(Of SqlServerValueGenerationStrategy), ByRef storeObject As StoreObjectIdentifier, Optional fromDataAnnotation As Boolean = false) As Boolean

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

valueGenerationStrategy
Nullable<SqlServerValueGenerationStrategy>

价值生成策略。

storeObject
StoreObjectIdentifier

表标识符。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

true 如果给定值可以设置为默认值生成策略,则为 。

注解

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

适用于