RuntimeModel.AddTypeMappingConfiguration Method

Definition

Adds configuration for a scalar type.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeMappingConfiguration AddTypeMappingConfiguration (Type clrType, int? maxLength = default, bool? unicode = default, int? precision = default, int? scale = default, Type? providerPropertyType = default, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? valueConverter = default);
abstract member AddTypeMappingConfiguration : Type * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter -> Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeMappingConfiguration
override this.AddTypeMappingConfiguration : Type * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter -> Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeMappingConfiguration
Public Overridable Function AddTypeMappingConfiguration (clrType As Type, Optional maxLength As Nullable(Of Integer) = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional providerPropertyType As Type = Nothing, Optional valueConverter As ValueConverter = Nothing) As RuntimeTypeMappingConfiguration

Parameters

clrType
Type

The type of value the property will hold.

maxLength
Nullable<Int32>

The maximum length of data that is allowed in this property type.

unicode
Nullable<Boolean>

A value indicating whether or not the property can persist Unicode characters.

precision
Nullable<Int32>

The precision of data that is allowed in this property type.

scale
Nullable<Int32>

The scale of data that is allowed in this property type.

providerPropertyType
Type

The type that the property value will be converted to before being sent to the database provider.

valueConverter
ValueConverter

The custom ValueConverter for this type.

Returns

The newly created property.

Applies to