IMutableProperty.SetValueGeneratorFactory Method

Definition

Overloads

SetValueGeneratorFactory(Func<IProperty,IEntityType,ValueGenerator>)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

SetValueGeneratorFactory(Func<IProperty,ITypeBase,ValueGenerator>)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

SetValueGeneratorFactory(Type)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

SetValueGeneratorFactory(Func<IProperty,IEntityType,ValueGenerator>)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

public void SetValueGeneratorFactory (Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>? valueGeneratorFactory);
abstract member SetValueGeneratorFactory : Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> -> unit
Public Sub SetValueGeneratorFactory (valueGeneratorFactory As Func(Of IProperty, IEntityType, ValueGenerator))

Parameters

valueGeneratorFactory
Func<IProperty,IEntityType,ValueGenerator>

A factory that will be used to create the value generator, or null to clear any previously set factory.

Remarks

Setting null does not disable value generation for this property, it just clears any generator explicitly configured for this property. The database provider may still have a value generator for the property type.

Applies to

SetValueGeneratorFactory(Func<IProperty,ITypeBase,ValueGenerator>)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

public void SetValueGeneratorFactory (Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.ITypeBase,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>? valueGeneratorFactory);
abstract member SetValueGeneratorFactory : Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.ITypeBase, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> -> unit
Public Sub SetValueGeneratorFactory (valueGeneratorFactory As Func(Of IProperty, ITypeBase, ValueGenerator))

Parameters

valueGeneratorFactory
Func<IProperty,ITypeBase,ValueGenerator>

A factory that will be used to create the value generator, or null to clear any previously set factory.

Remarks

Setting null does not disable value generation for this property, it just clears any generator explicitly configured for this property. The database provider may still have a value generator for the property type.

Applies to

SetValueGeneratorFactory(Type)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

public void SetValueGeneratorFactory (Type? valueGeneratorFactory);
abstract member SetValueGeneratorFactory : Type -> unit
Public Sub SetValueGeneratorFactory (valueGeneratorFactory As Type)

Parameters

valueGeneratorFactory
Type

A factory that will be used to create the value generator, or null to clear any previously set factory.

Remarks

Setting null does not disable value generation for this property, it just clears any generator explicitly configured for this property. The database provider may still have a value generator for the property type.

Applies to