Table of Contents

Struct ValueConverterInfo

Namespace
Microsoft.EntityFrameworkCore.Storage.ValueConversion
Assembly
Microsoft.EntityFrameworkCore.dll

Contains information on an available ValueConverter including a factory to create an instance.

public readonly struct ValueConverterInfo
Inherited Members

Remarks

See EF Core value converters for more information and examples.

Constructors

ValueConverterInfo(Type, Type, Func<ValueConverterInfo, ValueConverter>, ConverterMappingHints?)

Creates a new ValueConverterInfo instance.

public ValueConverterInfo(Type modelClrType, Type providerClrType, Func<ValueConverterInfo, ValueConverter> factory, ConverterMappingHints? mappingHints = null)

Parameters

modelClrType Type

The CLR type used in the EF model.

providerClrType Type

The CLR type used when reading and writing from the database provider.

factory Func<ValueConverterInfo, ValueConverter>

A factory to create the converter, if needed.

mappingHints ConverterMappingHints

Hints that can be used by the ITypeMappingSource to create data types with appropriate facets for the converted data.

Remarks

See EF Core value converters for more information and examples.

Properties

MappingHints

Hints that can be used by the ITypeMappingSource to create data types with appropriate facets for the converted data.

public ConverterMappingHints? MappingHints { get; }

Property Value

ConverterMappingHints

ModelClrType

The CLR type used in the EF model.

public Type ModelClrType { get; }

Property Value

Type

ProviderClrType

The CLR type used when reading and writing from the database provider.

public Type ProviderClrType { get; }

Property Value

Type

Methods

Create()

Creates an instance of the ValueConverter.

public ValueConverter Create()

Returns

ValueConverter