IMutableProperty.SetValueGeneratorFactory Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetValueGeneratorFactory(Func<IProperty,IEntityType,ValueGenerator>) |
Sets the factory to use for generating values for this property, or |
SetValueGeneratorFactory(Func<IProperty,ITypeBase,ValueGenerator>) |
Sets the factory to use for generating values for this property, or |
SetValueGeneratorFactory(Type) |
Sets the factory to use for generating values for this property, or |
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
Entity Framework