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

指示是否使用数据注释指定配置。

返回

新创建的属性。

适用于