TypeMappingConfigurationBuilder.HasConversion Method

Definition

Overloads

HasConversion(Type)

Configures the property so that the property value is converted before writing to the database and converted back when reading from the database.

HasConversion<TConversion>()

Configures the property so that the property value is converted before writing to the database and converted back when reading from the database.

HasConversion(Type)

Configures the property so that the property value is converted before writing to the database and converted back when reading from the database.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder HasConversion (Type conversionType);
abstract member HasConversion : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder
override this.HasConversion : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder
Public Overridable Function HasConversion (conversionType As Type) As TypeMappingConfigurationBuilder

Parameters

conversionType
Type

The type to convert to and from or a type that derives from ValueConverter.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

HasConversion<TConversion>()

Configures the property so that the property value is converted before writing to the database and converted back when reading from the database.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder HasConversion<TConversion> ();
abstract member HasConversion : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder
override this.HasConversion : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder
Public Overridable Function HasConversion(Of TConversion) () As TypeMappingConfigurationBuilder

Type Parameters

TConversion

The type to convert to and from or a type that derives from ValueConverter.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to