IConventionTypeBase.AddComplexProperty 方法

定义

重载

AddComplexProperty(String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(MemberInfo, String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(String, Type, Type, String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(String, Type, MemberInfo, Type, String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(String, Boolean, Boolean)

向此类型添加属性。

public Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty? AddComplexProperty (string name, bool collection = false, bool fromDataAnnotation = false);
abstract member AddComplexProperty : string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
Public Function AddComplexProperty (name As String, Optional collection As Boolean = false, Optional fromDataAnnotation As Boolean = false) As IConventionComplexProperty

参数

name
String

要添加的属性的名称。

collection
Boolean

指示 属性是否表示集合。

fromDataAnnotation
Boolean

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

返回

新建的属性。

适用于

AddComplexProperty(MemberInfo, String, Boolean, Boolean)

向此类型添加属性。

[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Currently used only in tests")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty? AddComplexProperty (System.Reflection.MemberInfo memberInfo, string? complexTypeName = default, bool collection = false, bool fromDataAnnotation = false);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Currently used only in tests")>]
abstract member AddComplexProperty : System.Reflection.MemberInfo * string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
override this.AddComplexProperty : System.Reflection.MemberInfo * string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
Public Overridable Function AddComplexProperty (memberInfo As MemberInfo, Optional complexTypeName As String = Nothing, Optional collection As Boolean = false, Optional fromDataAnnotation As Boolean = false) As IConventionComplexProperty

参数

memberInfo
MemberInfo

类型上的相应成员。

complexTypeName
String

复杂类型的名称。

collection
Boolean

指示 属性是否表示集合。

fromDataAnnotation
Boolean

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

返回

新建的属性。

属性

适用于

AddComplexProperty(String, Type, Type, String, Boolean, Boolean)

向此类型添加属性。

public Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty? AddComplexProperty (string name, Type propertyType, Type complexType, string? complexTypeName = default, bool collection = false, bool fromDataAnnotation = false);
abstract member AddComplexProperty : string * Type * Type * string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
Public Function AddComplexProperty (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

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

返回

新建的属性。

适用于

AddComplexProperty(String, Type, MemberInfo, Type, String, Boolean, Boolean)

向此类型添加属性。

public Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty? AddComplexProperty (string name, Type propertyType, System.Reflection.MemberInfo memberInfo, Type complexType, string? complexTypeName = default, bool collection = false, bool fromDataAnnotation = false);
abstract member AddComplexProperty : string * Type * System.Reflection.MemberInfo * Type * string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionComplexProperty
Public Function AddComplexProperty (name As String, propertyType As Type, memberInfo As MemberInfo, complexType As Type, Optional complexTypeName As String = Nothing, Optional collection As Boolean = false, Optional fromDataAnnotation As Boolean = false) As IConventionComplexProperty

参数

name
String

要添加的属性的名称。

propertyType
Type

属性类型。

memberInfo
MemberInfo

相应的 CLR 类型成员。

可以使用具有 String 参数和 Object 返回类型的索引器。

complexType
Type

属性将保留的值的类型。

complexTypeName
String

复杂类型的名称。

collection
Boolean

指示 属性是否表示集合。

fromDataAnnotation
Boolean

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

返回

新建的属性。

适用于