Condividi tramite


RuntimeTypeBase.AddComplexProperty Metodo

Definizione

Aggiunge una proprietà complessa a questo tipo di entità.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeComplexProperty AddComplexProperty (string name, Type clrType, string targetTypeName, Type targetType, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, bool nullable = false, bool collection = false, Microsoft.EntityFrameworkCore.ChangeTrackingStrategy changeTrackingStrategy = Microsoft.EntityFrameworkCore.ChangeTrackingStrategy.Snapshot, System.Reflection.PropertyInfo? indexerPropertyInfo = default, bool propertyBag = false);
abstract member AddComplexProperty : string * Type * string * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool * bool * Microsoft.EntityFrameworkCore.ChangeTrackingStrategy * System.Reflection.PropertyInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeComplexProperty
override this.AddComplexProperty : string * Type * string * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool * bool * Microsoft.EntityFrameworkCore.ChangeTrackingStrategy * System.Reflection.PropertyInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeComplexProperty
Public Overridable Function AddComplexProperty (name As String, clrType As Type, targetTypeName As String, targetType As Type, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, Optional nullable As Boolean = false, Optional collection As Boolean = false, Optional changeTrackingStrategy As ChangeTrackingStrategy = Microsoft.EntityFrameworkCore.ChangeTrackingStrategy.Snapshot, Optional indexerPropertyInfo As PropertyInfo = Nothing, Optional propertyBag As Boolean = false) As RuntimeComplexProperty

Parametri

name
String

Nome della proprietà da aggiungere.

clrType
Type

Tipo di valore che la proprietà conterrà.

targetTypeName
String

Nome del tipo complesso da aggiungere.

targetType
Type

Tipo CLR utilizzato per rappresentare le istanze di questo tipo complesso.

propertyInfo
PropertyInfo

Proprietà CLR corrispondente o null per una proprietà shadow.

fieldInfo
FieldInfo

Campo CLR corrispondente o null per una proprietà shadow.

propertyAccessMode
PropertyAccessMode

Oggetto PropertyAccessMode utilizzato per questa proprietà.

nullable
Boolean

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

collection
Boolean

Indica se la proprietà rappresenta una raccolta.

changeTrackingStrategy
ChangeTrackingStrategy

Strategia di rilevamento delle modifiche per questo tipo complesso.

indexerPropertyInfo
PropertyInfo

Oggetto PropertyInfo per l'indicizzatore nel tipo CLR associato, se presente.

propertyBag
Boolean

Valore che indica se questo tipo di entità dispone di un indicizzatore in grado di contenere proprietà arbitrarie e un metodo che può essere utilizzato per determinare se una determinata proprietà dell'indicizzatore contiene un valore.

Restituisce

Proprietà appena creata.

Si applica a