ValueConverterInfo 构造函数

定义

创建一个新的 ValueConverterInfo 实例。

public ValueConverterInfo (Type modelClrType, Type providerClrType, Func<Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverterInfo,Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter> factory, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = default);
public ValueConverterInfo (Type modelClrType, Type providerClrType, Func<Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverterInfo,Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter> factory, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = default);
new Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverterInfo : Type * Type * Func<Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverterInfo, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter> * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints -> Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverterInfo
Public Sub New (modelClrType As Type, providerClrType As Type, factory As Func(Of ValueConverterInfo, ValueConverter), Optional mappingHints As ConverterMappingHints = Nothing)

参数

modelClrType
Type

EF 模型中使用的 CLR 类型。

providerClrType
Type

从数据库提供程序读取和写入时使用的 CLR 类型。

factory
Func<ValueConverterInfo,ValueConverter>

用于创建转换器的工厂(如果需要)。

mappingHints
ConverterMappingHints

可用于 ITypeMappingSource 为转换的数据创建具有适当分面的数据类型的提示。

注解

有关详细信息和示例 ,请参阅 EF Core 值转换器

适用于