ValueGenerator<TValue> ValueGenerator(Of TValue) Class


Generates values for properties when an entity is added to a context.

public abstract class ValueGenerator<TValue> : ValueGenerator
Public MustInherit Class ValueGenerator(Of TValue)
    Inherits ValueGenerator

Type Parameters

ValueGenerator<TValue>ValueGenerator(Of TValue)


System.Object.Equals(System.Object) System.Object.Equals(System.Object) Inherited from System.Object
System.Object.Equals(System.Object, System.Object) System.Object.Equals(System.Object, System.Object) Inherited from System.Object
System.Object.GetHashCode() System.Object.GetHashCode() Inherited from System.Object
System.Object.GetType() System.Object.GetType() Inherited from System.Object
System.Object.MemberwiseClone() System.Object.MemberwiseClone() Inherited from System.Object
Next(EntityEntry) Next(EntityEntry)

Template method to be overridden by implementations to perform value generation.

NextAsync(EntityEntry, CancellationToken) NextAsync(EntityEntry, CancellationToken)

Template method to be overridden by implementations to perform value generation.

NextValue(EntityEntry) NextValue(EntityEntry)

Gets a value to be assigned to a property.

NextValueAsync(EntityEntry, CancellationToken) NextValueAsync(EntityEntry, CancellationToken)

Gets a value to be assigned to a property.

System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) Inherited from System.Object
System.Object.ToString() System.Object.ToString() Inherited from System.Object


GeneratesTemporaryValues GeneratesTemporaryValues

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).

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 System.Guid primary key which are saved to the database.

(Inherited from ValueGenerator)