SqlServerValueGenerationStrategy Enum
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.
Defines two strategies to use across the EF Core stack when generating key values from SQL Server database columns.
public enum SqlServerValueGenerationStrategy
type SqlServerValueGenerationStrategy =
Public Enum SqlServerValueGenerationStrategy
- Inheritance
-
SqlServerValueGenerationStrategy
Fields
IdentityColumn | 2 | A pattern that uses a normal SQL Server |
None | 0 | No SQL Server-specific strategy |
Sequence | 3 | A pattern that uses a database sequence to generate values for the column. |
SequenceHiLo | 1 | A sequence-based hi-lo pattern where blocks of IDs are allocated from the server and used client-side for generating keys. |
Remarks
See Model building conventions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för