SqlServerPropertyBuilderExtensions.ForSqlServerHasValueGenerationStrategy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use HasValueGenerationStrategy
Configures the value generation strategy for the key property, when targeting SQL Server.
[System.Obsolete("Use HasValueGenerationStrategy")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder ForSqlServerHasValueGenerationStrategy (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy? valueGenerationStrategy, bool fromDataAnnotation = false);
[<System.Obsolete("Use HasValueGenerationStrategy")>]
static member ForSqlServerHasValueGenerationStrategy : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * Nullable<Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
<Extension()>
Public Function ForSqlServerHasValueGenerationStrategy (propertyBuilder As IConventionPropertyBuilder, valueGenerationStrategy As Nullable(Of SqlServerValueGenerationStrategy), Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder
Parameters
- propertyBuilder
- IConventionPropertyBuilder
The builder for the property being configured.
- valueGenerationStrategy
- Nullable<SqlServerValueGenerationStrategy>
The value generation strategy.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the configuration was applied,
null
otherwise.
- Attributes
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for