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
指出是否使用資料批註來指定組態。
傳回
新建立的屬性。