Share via


ValueConverterSelector Class

Definition

A registry of ValueConverter instances that can be used to find the preferred converter to use to convert to and from a given model type to a type that the database provider supports.

public class ValueConverterSelector : Microsoft.EntityFrameworkCore.Storage.ValueConversion.IValueConverterSelector
type ValueConverterSelector = class
    interface IValueConverterSelector
Public Class ValueConverterSelector
Implements IValueConverterSelector
Inheritance
ValueConverterSelector
Implements

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See EF Core value converters for more information and examples.

Constructors

ValueConverterSelector(ValueConverterSelectorDependencies)

Initializes a new instance of the ValueConverterSelector class.

Properties

Dependencies

Dependencies for this service.

Methods

Select(Type, Type)

Returns the list of ValueConverter instances that can be used to convert the given model type. Converters nearer the front of the list should be used in preference to converters nearer the end.

Applies to