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
Name | Value | Description |
---|---|---|
None | 0 | No SQL Server-specific strategy |
SequenceHiLo | 1 | A sequence-based hi-lo pattern where blocks of IDs are allocated from the server and used client-side for generating keys. |
IdentityColumn | 2 | A pattern that uses a normal SQL Server |
Sequence | 3 | A pattern that uses a database sequence to generate values for the column. |
Remarks
See Model building conventions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.