PropertiesConfigurationBuilder.HaveConversion Method

Definition

Overloads

HaveConversion(Type, Type)

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

HaveConversion(Type, Type, Type)

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

HaveConversion(Type)

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

HaveConversion<TConversion,TComparer,TProviderComparer>()

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

HaveConversion<TConversion,TComparer>()

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

HaveConversion<TConversion>()

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

HaveConversion(Type, Type)

Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs

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

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveConversion (Type conversionType, Type? comparerType);

Parameters

conversionType
Type

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

comparerType
Type

A type that inherits from ValueComparer.

Returns

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

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 6.0, 7.0, 8.0, 9.0

HaveConversion(Type, Type, Type)

Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs

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

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveConversion (Type conversionType, Type? comparerType, Type? providerComparerType);

Parameters

conversionType
Type

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

comparerType
Type

A type that inherits from ValueComparer.

providerComparerType
Type

A type that inherits from ValueComparer to use for the provider values.

Returns

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

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 7.0, 8.0, 9.0

HaveConversion(Type)

Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs

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

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveConversion (Type conversionType);

Parameters

conversionType
Type

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

Returns

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

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 6.0, 7.0, 8.0, 9.0

HaveConversion<TConversion,TComparer,TProviderComparer>()

Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs

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

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveConversion<TConversion,TComparer,TProviderComparer> () where TComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer;

Type Parameters

TConversion

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

TComparer

A type that inherits from ValueComparer.

TProviderComparer

A type that inherits from ValueComparer to use for the provider values.

Returns

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

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 7.0, 8.0, 9.0

HaveConversion<TConversion,TComparer>()

Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs

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

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveConversion<TConversion,TComparer> () where TComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer;

Type Parameters

TConversion

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

TComparer

A type that inherits from ValueComparer.

Returns

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

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 6.0, 7.0, 8.0, 9.0

HaveConversion<TConversion>()

Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs
Source:
PropertiesConfigurationBuilder.cs

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

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder HaveConversion<TConversion> ();

Type Parameters

TConversion

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

Returns

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

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 6.0, 7.0, 8.0, 9.0