IConventionTypeBase.AddComplexIndexerProperty 方法

定義

將 和 索引子所支援的屬性加入至此類型。

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

參數

name
String

要加入的屬性名稱。

propertyType
Type

屬性型別。

complexType
Type

屬性將保留的數值型別。

complexTypeName
String

複雜類型的名稱。

collection
Boolean

指出 屬性是否代表集合。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

新建立的屬性。

適用於