TypeMappingConfigurationBuilder<TProperty>.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<TProperty> HasConversion (Type conversionType);
override this.HasConversion : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder<'Property>
Public Overridable Function HasConversion (conversionType As Type) As TypeMappingConfigurationBuilder(Of TProperty)

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<TProperty> HasConversion<TConversion> ();
override this.HasConversion : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder<'Property>
Public Overridable Function HasConversion(Of TConversion) () As TypeMappingConfigurationBuilder(Of TProperty)

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