PropertyBuilder<TProperty>.ValueGeneratedOnAdd Method


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<TProperty> ValueGeneratedOnAdd ();
override this.ValueGeneratedOnAdd : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
Public Overridable Function ValueGeneratedOnAdd () As PropertyBuilder(Of TProperty)



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

Applies to