Share via


SqlServerModelExtensions.SetValueGenerationStrategy Method

Definition

Overloads

SetValueGenerationStrategy(IMutableModel, Nullable<SqlServerValueGenerationStrategy>)

Sets the SqlServerValueGenerationStrategy to use for properties of keys in the model that don't have a strategy explicitly set.

SetValueGenerationStrategy(IConventionModel, Nullable<SqlServerValueGenerationStrategy>, Boolean)

Sets the SqlServerValueGenerationStrategy to use for properties of keys in the model that don't have a strategy explicitly set.

SetValueGenerationStrategy(IMutableModel, Nullable<SqlServerValueGenerationStrategy>)

Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs

Sets the SqlServerValueGenerationStrategy to use for properties of keys in the model that don't have a strategy explicitly set.

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))

Parameters

model
IMutableModel

The model.

value
Nullable<SqlServerValueGenerationStrategy>

The value to set.

Applies to

SetValueGenerationStrategy(IConventionModel, Nullable<SqlServerValueGenerationStrategy>, Boolean)

Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs

Sets the SqlServerValueGenerationStrategy to use for properties of keys in the model that don't have a strategy explicitly set.

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)

Parameters

model
IConventionModel

The model.

value
Nullable<SqlServerValueGenerationStrategy>

The value to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to