ConventionPropertyExtensions.SetProviderClrType Method

Definition

Sets the type that the property value will be converted to before being sent to the database provider.

public static void SetProviderClrType (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Type providerClrType, bool fromDataAnnotation = false);
public static Type SetProviderClrType (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Type providerClrType, bool fromDataAnnotation = false);
static member SetProviderClrType : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Type * bool -> unit
static member SetProviderClrType : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Type * bool -> Type
<Extension()>
Public Sub SetProviderClrType (property As IConventionProperty, providerClrType As Type, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetProviderClrType (property As IConventionProperty, providerClrType As Type, Optional fromDataAnnotation As Boolean = false) As Type

Parameters

property
IConventionProperty

The property.

providerClrType
Type

The type to use, or null to remove any previously set type.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to