TypeMappingConfigurationBuilder.HasConversion Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: