Compartilhar via


RuntimeModel.AddTypeMappingConfiguration Método

Definição

Adiciona a configuração para um tipo escalar.

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

Parâmetros

clrType
Type

O tipo de valor que a propriedade conterá.

maxLength
Nullable<Int32>

O comprimento máximo dos dados permitidos nesse tipo de propriedade.

unicode
Nullable<Boolean>

Um valor que indica se a propriedade pode ou não persistir caracteres Unicode.

precision
Nullable<Int32>

A precisão dos dados permitidos nesse tipo de propriedade.

scale
Nullable<Int32>

A escala de dados permitida nesse tipo de propriedade.

providerPropertyType
Type

O tipo para o qual o valor da propriedade será convertido antes de ser enviado ao provedor de banco de dados.

valueConverter
ValueConverter

O personalizado ValueConverter para esse tipo.

Retornos

A propriedade recém-criada.

Aplica-se a