SqlServerModelExtensions.SetValueGenerationStrategy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetValueGenerationStrategy(IMutableModel, Nullable<SqlServerValueGenerationStrategy>)
SqlServerValueGenerationStrategy设置 要用于模型中未显式设置策略的键属性的 。
public static void SetValueGenerationStrategy (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? value);
static member SetValueGenerationStrategy : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy> -> unit
<Extension()>
Public Sub SetValueGenerationStrategy (model As IMutableModel, value As Nullable(Of SqlServerValueGenerationStrategy))
参数
- model
- IMutableModel
模型。
要设置的值。
适用于
SetValueGenerationStrategy(IConventionModel, Nullable<SqlServerValueGenerationStrategy>, Boolean)
SqlServerValueGenerationStrategy设置 要用于模型中未显式设置策略的键属性的 。
public static void SetValueGenerationStrategy (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? value, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? SetValueGenerationStrategy (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? value, bool fromDataAnnotation = false);
static member SetValueGenerationStrategy : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy> * bool -> unit
static member SetValueGenerationStrategy : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy> * bool -> Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy>
<Extension()>
Public Sub SetValueGenerationStrategy (model As IConventionModel, value As Nullable(Of SqlServerValueGenerationStrategy), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetValueGenerationStrategy (model As IConventionModel, value As Nullable(Of SqlServerValueGenerationStrategy), Optional fromDataAnnotation As Boolean = false) As Nullable(Of SqlServerValueGenerationStrategy)
参数
- model
- IConventionModel
模型。
要设置的值。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
配置的值。