ConverterMappingHints 构造函数

定义

创建一个新的 ConverterMappingHints 实例。 实例中包含的任何提示都可以 null 指示它尚未指定。

public ConverterMappingHints (int? size = default, int? precision = default, int? scale = default, bool? unicode = default, Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> valueGeneratorFactory = default);
public ConverterMappingHints (int? size = default, int? precision = default, int? scale = default, bool? unicode = default, Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>? valueGeneratorFactory = default);
new Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints : Nullable<int> * Nullable<int> * Nullable<int> * Nullable<bool> * Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> -> Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints
Public Sub New (Optional size As Nullable(Of Integer) = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional valueGeneratorFactory As Func(Of IProperty, IEntityType, ValueGenerator) = Nothing)

参数

size
Nullable<Int32>

映射数据类型的建议大小。

precision
Nullable<Int32>

映射数据类型的建议精度。

scale
Nullable<Int32>

映射数据类型的建议小数位数。

unicode
Nullable<Boolean>

映射的数据类型是否应支持 Unicode。

valueGeneratorFactory
Func<IProperty,IEntityType,ValueGenerator>

用于创建特定 ValueGenerator的可选工厂。

注解

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

适用于