IConventionElementTypeBuilder.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, Boolean) |
Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database. |
HasConversion(ValueConverter, Boolean) |
Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database. |
HasConversion(Type, Boolean)
Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder? HasConversion (Type? providerClrType, bool fromDataAnnotation = false);
abstract member HasConversion : Type * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder
Public Function HasConversion (providerClrType As Type, Optional fromDataAnnotation As Boolean = false) As IConventionElementTypeBuilder
Parameters
- providerClrType
- Type
The type to convert to and from.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the configuration was applied,
null
otherwise.
Applies to
HasConversion(ValueConverter, Boolean)
Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder? HasConversion (Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? converter, bool fromDataAnnotation = false);
abstract member HasConversion : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder
Public Function HasConversion (converter As ValueConverter, Optional fromDataAnnotation As Boolean = false) As IConventionElementTypeBuilder
Parameters
- converter
- ValueConverter
The converter to use.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the configuration was applied,
null
otherwise.
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: