共用方式為


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

public class RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector
type RelationalValueGeneratorSelector = class
    inherit ValueGeneratorSelector
Public Class RelationalValueGeneratorSelector
Inherits ValueGeneratorSelector
Inheritance
RelationalValueGeneratorSelector

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

RelationalValueGeneratorSelector(IValueGeneratorCache, IRelationalAnnotationProvider)
RelationalValueGeneratorSelector(ValueGeneratorSelectorDependencies)

Initializes a new instance of the RelationalValueGeneratorSelector class.

Properties

Cache

The cache being used to store value generator instances.

(Inherited from ValueGeneratorSelector)
Dependencies

Dependencies for this service.

(Inherited from ValueGeneratorSelector)
RelationalExtensions

Methods

Create(IProperty, IEntityType)

Creates a new value generator for the given property.

Create(IProperty, IEntityType)

Creates a new value generator for the given property.

(Inherited from ValueGeneratorSelector)
Create(IProperty, ITypeBase)
Obsolete.

Creates a new value generator for the given property.

(Inherited from ValueGeneratorSelector)
FindForType(IProperty, IEntityType, Type)

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

FindForType(IProperty, IEntityType, Type)

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

(Inherited from ValueGeneratorSelector)
FindForType(IProperty, ITypeBase, 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.

(Inherited from ValueGeneratorSelector)
Select(IProperty, IEntityType)

Selects the appropriate value generator for a given property.

(Inherited from ValueGeneratorSelector)
Select(IProperty, ITypeBase)
Obsolete.

Selects the appropriate value generator for a given property.

(Inherited from ValueGeneratorSelector)
TryCreate(IProperty, ITypeBase, ValueGenerator)

Creates a new value generator for the given property.

(Inherited from ValueGeneratorSelector)
TrySelect(IProperty, ITypeBase, ValueGenerator)

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

(Inherited from ValueGeneratorSelector)

Applies to