Share via


PropertyBuilder.ValueGeneratedOnAdd Method

Definition

Configures a property to have a value generated only when saving a new entity, unless a non-null, non-temporary value has been set, in which case the set value will be saved instead. The value may be generated by a client-side value generator or may be generated by the database as part of saving the entity.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder ValueGeneratedOnAdd ();
abstract member ValueGeneratedOnAdd : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
override this.ValueGeneratedOnAdd : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
Public Overridable Function ValueGeneratedOnAdd () As PropertyBuilder

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to