IConventionTypeBase.AddComplexProperty 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
属性类型。
- complexType
- Type
属性将保留的值的类型。
- complexTypeName
- String
复杂类型的名称。
- collection
- Boolean
指示 属性是否表示集合。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
新建的属性。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈