Partager via


RuntimeTypeBase.AddComplexProperty Méthode

Définition

Ajoute une propriété complexe à ce type d’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

Paramètres

name
String

Nom de la propriété à ajouter.

clrType
Type

Type de valeur que la propriété contiendra.

targetTypeName
String

Nom du type complexe à ajouter.

targetType
Type

Type CLR utilisé pour représenter des instances de ce type complexe.

propertyInfo
PropertyInfo

Propriété CLR correspondante ou null pour une propriété d’ombre.

fieldInfo
FieldInfo

Champ CLR correspondant ou null pour une propriété d’ombre.

propertyAccessMode
PropertyAccessMode

PropertyAccessMode utilisé pour cette propriété.

nullable
Boolean

Valeur indiquant si cette propriété peut contenir null.

collection
Boolean

Indique si la propriété représente une collection.

changeTrackingStrategy
ChangeTrackingStrategy

Stratégie de suivi des modifications pour ce type complexe.

indexerPropertyInfo
PropertyInfo

PropertyInfo pour l’indexeur sur le type CLR associé s’il en existe un.

propertyBag
Boolean

Valeur indiquant si ce type d’entité a un indexeur capable de contenir des propriétés arbitraires et une méthode qui peut être utilisée pour déterminer si une propriété d’indexeur donnée contient une valeur.

Retours

Propriété nouvellement créée.

S’applique à