Condividi tramite


RuntimeModel.AddTypeMappingConfiguration Metodo

Definizione

Aggiunge la configurazione per un tipo scalare.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeMappingConfiguration AddTypeMappingConfiguration (Type clrType, int? maxLength = default, bool? unicode = default, int? precision = default, int? scale = default, Type? providerPropertyType = default, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? valueConverter = default);
abstract member AddTypeMappingConfiguration : Type * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter -> Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeMappingConfiguration
override this.AddTypeMappingConfiguration : Type * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter -> Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeMappingConfiguration
Public Overridable Function AddTypeMappingConfiguration (clrType As Type, Optional maxLength As Nullable(Of Integer) = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional providerPropertyType As Type = Nothing, Optional valueConverter As ValueConverter = Nothing) As RuntimeTypeMappingConfiguration

Parametri

clrType
Type

Tipo di valore che la proprietà conterrà.

maxLength
Nullable<Int32>

Lunghezza massima dei dati consentiti in questo tipo di proprietà.

unicode
Nullable<Boolean>

Valore che indica se la proprietà può rendere persistenti i caratteri Unicode.

precision
Nullable<Int32>

Precisione dei dati consentiti in questo tipo di proprietà.

scale
Nullable<Int32>

Scala dei dati consentiti in questo tipo di proprietà.

providerPropertyType
Type

Tipo in cui verrà convertito il valore della proprietà prima di essere inviato al provider di database.

valueConverter
ValueConverter

Oggetto personalizzato ValueConverter per questo tipo.

Restituisce

Proprietà appena creata.

Si applica a