Share via


RuntimeTypeBase.AddComplexProperty Methode

Definition

Fügt diesem Entitätstyp eine komplexe Eigenschaft hinzu.

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

Parameter

name
String

Der Name der hinzuzufügenden Eigenschaft.

clrType
Type

Der Werttyp, den die Eigenschaft enthält.

targetTypeName
String

Der Name des hinzuzufügenden komplexen Typs.

targetType
Type

Der CLR-Typ, der verwendet wird, um Instanzen dieses komplexen Typs darzustellen.

propertyInfo
PropertyInfo

Die entsprechende CLR-Eigenschaft oder null für eine Schatteneigenschaft.

fieldInfo
FieldInfo

Das entsprechende CLR-Feld oder null für eine Schatteneigenschaft.

propertyAccessMode
PropertyAccessMode

Die PropertyAccessMode für diese Eigenschaft verwendete.

nullable
Boolean

Ein Wert, der angibt, ob diese Eigenschaft enthalten nullkann.

collection
Boolean

Gibt an, ob die -Eigenschaft eine Auflistung darstellt.

changeTrackingStrategy
ChangeTrackingStrategy

Die Änderungsnachverfolgungsstrategie für diesen komplexen Typ.

indexerPropertyInfo
PropertyInfo

Der PropertyInfo für den Indexer für den zugeordneten CLR-Typ, sofern vorhanden.

propertyBag
Boolean

Ein Wert, der angibt, ob dieser Entitätstyp über einen Indexer verfügt, der beliebige Eigenschaften enthalten kann, und eine Methode, mit der ermittelt werden kann, ob eine bestimmte Indexereigenschaft einen Wert enthält.

Gibt zurück

Die neu erstellte Eigenschaft.

Gilt für: