RuntimeTypeBase.AddComplexProperty Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Agrega una propiedad compleja a este tipo de entidad.
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
Parámetros
- name
- String
Nombre de la propiedad que se va a agregar.
- clrType
- Type
Tipo de valor que contendrá la propiedad.
- targetTypeName
- String
Nombre del tipo complejo que se va a agregar.
- targetType
- Type
Tipo CLR que se usa para representar instancias de este tipo complejo.
- propertyInfo
- PropertyInfo
Propiedad CLR correspondiente o null
para una propiedad shadow.
- fieldInfo
- FieldInfo
Campo CLR correspondiente o null
para una propiedad shadow.
- propertyAccessMode
- PropertyAccessMode
utilizado PropertyAccessMode para esta propiedad.
- nullable
- Boolean
Valor que indica si esta propiedad puede contener null
.
- collection
- Boolean
Indica si la propiedad representa una colección.
- changeTrackingStrategy
- ChangeTrackingStrategy
Estrategia de seguimiento de cambios para este tipo complejo.
- indexerPropertyInfo
- PropertyInfo
PropertyInfo para el indizador en el tipo CLR asociado si existe uno.
- propertyBag
- Boolean
Valor que indica si este tipo de entidad tiene un indexador que puede contener propiedades arbitrarias y un método que se puede usar para determinar si una propiedad de indexador determinada contiene un valor.
Devoluciones
Propiedad recién creada.