Enum NpgsqlValueGenerationStrategy
Defines strategies to use when generating values for database columns.
Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public enum NpgsqlValueGenerationStrategy
Remarks
Fields
Name | Description |
---|---|
IdentityAlwaysColumn | Selects the always-identity column strategy (a value cannot be provided). Available only starting PostgreSQL 10. |
IdentityByDefaultColumn | Selects the by-default-identity column strategy (a value can be provided to override the identity mechanism). Available only starting PostgreSQL 10. |
None | No Npgsql-specific strategy. |
Sequence | A pattern that uses a database sequence to generate values for the column. |
SequenceHiLo | A sequence-based hi-lo pattern where blocks of IDs are allocated from the server and used client-side for generating keys. This is an advanced pattern--only use this strategy if you are certain it is what you need. |
SerialColumn | Selects the serial column strategy, which is a regular column backed by an auto-created index. If you are creating a new project on PostgreSQL 10 or above, consider using IdentityByDefaultColumn instead. |