Condividi tramite


RuntimeProperty.SetElementType Metodo

Definizione

Imposta il tipo di elemento per questa proprietà.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeElementType SetElementType (Type clrType, bool nullable = false, int? maxLength = default, bool? unicode = default, int? precision = default, int? scale = default, Type? providerPropertyType = default, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? valueConverter = default, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? valueComparer = default, Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter? jsonValueReaderWriter = default, Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? typeMapping = default, bool primitiveCollection = false);
abstract member SetElementType : Type * bool * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeElementType
override this.SetElementType : Type * bool * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeElementType
Public Overridable Function SetElementType (clrType As Type, Optional nullable As Boolean = false, 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, Optional valueComparer As ValueComparer = Nothing, Optional jsonValueReaderWriter As JsonValueReaderWriter = Nothing, Optional typeMapping As CoreTypeMapping = Nothing, Optional primitiveCollection As Boolean = false) As RuntimeElementType

Parametri

clrType
Type

Il tipo di valore che la proprietà conterrà.

nullable
Boolean

Valore che indica se questa proprietà può contenere null.

maxLength
Nullable<Int32>

Lunghezza massima dei dati consentiti in questa proprietà.

unicode
Nullable<Boolean>

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

precision
Nullable<Int32>

Precisione dei dati consentiti in questa proprietà.

scale
Nullable<Int32>

Scala dei dati consentiti in questa proprietà.

providerPropertyType
Type

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

valueConverter
ValueConverter

Set personalizzato ValueConverter per questa proprietà.

valueComparer
ValueComparer

Oggetto ValueComparer per questa proprietà.

jsonValueReaderWriter
JsonValueReaderWriter

Oggetto JsonValueReaderWriter per questa proprietà.

typeMapping
CoreTypeMapping

Oggetto CoreTypeMapping per questa proprietà.

primitiveCollection
Boolean

Valore che indica se questa proprietà rappresenta una raccolta primitiva.

Restituisce

Proprietà appena creata.

Si applica a