ValueGeneratorSelector Class

Definition

Selects value generators to be used to generate values for properties of entities.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

C#
public class ValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.IValueGeneratorSelector
Inheritance
ValueGeneratorSelector
Derived
Implements

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Implementation of database providers and extensions for more information and examples.

Constructors

Properties

Cache

The cache being used to store value generator instances.

Dependencies

Dependencies for this service.

Methods

Create(IProperty, IEntityType)

Creates a new value generator for the given property.

Create(IProperty, ITypeBase)
Obsolete.

Creates a new value generator for the given property.

FindForType(IProperty, IEntityType, Type)

Creates a new value generator for the given property and type, where the property may have a ValueConverter.

FindForType(IProperty, ITypeBase, Type)

Creates a new value generator for the given property and type, where the property may have a ValueConverter.

Select(IProperty, IEntityType)

Selects the appropriate value generator for a given property.

Select(IProperty, ITypeBase)
Obsolete.

Selects the appropriate value generator for a given property.

TryCreate(IProperty, ITypeBase, ValueGenerator)

Creates a new value generator for the given property.

TrySelect(IProperty, ITypeBase, ValueGenerator)

Selects the appropriate value generator for a given property, if available.

Applies to

Product Versions
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0