共用方式為


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 值轉換器

適用於