ValueGeneratorSelector Class
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.
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.
public class ValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.IValueGeneratorSelector
type ValueGeneratorSelector = class
interface IValueGeneratorSelector
Public Class ValueGeneratorSelector
Implements 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
ValueGeneratorSelector(IValueGeneratorCache) |
Initializes a new instance of the ValueGeneratorSelector class. |
ValueGeneratorSelector(ValueGeneratorSelectorDependencies) |
Initializes a new instance of the ValueGeneratorSelector class. |
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
Entity Framework