ValueGenerator.GeneratesTemporaryValues Property

Definition

Gets a value indicating whether the values generated are temporary (i.e they should be replaced by database generated values when the entity is saved) or are permanent (i.e. the generated values should be saved to the database).

public abstract bool GeneratesTemporaryValues { get; }
member this.GeneratesTemporaryValues : bool
Public MustOverride ReadOnly Property GeneratesTemporaryValues As Boolean

Property Value

Remarks

An example of temporary value generation is generating negative numbers for an integer primary key that are then replaced by positive numbers generated by the database when the entity is saved. An example of permanent value generation are client-generated values for a Guid primary key which are saved to the database.

See EF Core value generation for more information and examples.

Applies to