Condividi tramite


ConventionPropertyExtensions.SetValueConverter Metodo

Definizione

Imposta la proprietà personalizzata ValueConverter per questa proprietà.

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

Parametri

property
IConventionProperty

Proprietà.

converter
ValueConverter

Convertitore o null per rimuovere qualsiasi convertitore impostato in precedenza.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata usando un'annotazione dati.

Restituisce

Il valore configurato.

Si applica a