Udostępnij za pośrednictwem


IConventionTypeBase.AddComplexIndexerProperty Metoda

Definicja

Dodaje właściwość wspieraną przez element i indeksator do tego typu.

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty? AddComplexIndexerProperty (string name, Type propertyType, Type complexType, string? complexTypeName = default, bool collection = false, bool fromDataAnnotation = false);
abstract member AddComplexIndexerProperty : string * Type * Type * string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
override this.AddComplexIndexerProperty : string * Type * Type * string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
Public Overridable Function AddComplexIndexerProperty (name As String, propertyType As Type, complexType As Type, Optional complexTypeName As String = Nothing, Optional collection As Boolean = false, Optional fromDataAnnotation As Boolean = false) As IConventionComplexProperty

Parametry

name
String

Nazwa właściwości do dodania.

propertyType
Type

Typ właściwości.

complexType
Type

Typ wartości, która będzie przechowywana przez właściwość.

complexTypeName
String

Nazwa typu złożonego.

collection
Boolean

Wskazuje, czy właściwość reprezentuje kolekcję.

fromDataAnnotation
Boolean

Wskazuje, czy konfiguracja została określona przy użyciu adnotacji danych.

Zwraca

Nowo utworzona właściwość.

Dotyczy