IConventionTypeBase.AddComplexProperty Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddComplexProperty(String, Boolean, Boolean) |
Adds a property to this type. |
AddComplexProperty(MemberInfo, String, Boolean, Boolean) |
Adds a property to this type. |
AddComplexProperty(String, Type, Type, String, Boolean, Boolean) |
Adds a property to this type. |
AddComplexProperty(String, Type, MemberInfo, Type, String, Boolean, Boolean) |
Adds a property to this type. |
AddComplexProperty(String, Boolean, Boolean)
Adds a property to this type.
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
Parameters
- name
- String
The name of the property to add.
- collection
- Boolean
Indicates whether the property represents a collection.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
Applies to
AddComplexProperty(MemberInfo, String, Boolean, Boolean)
Adds a property to this type.
[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
Parameters
- memberInfo
- MemberInfo
The corresponding member on the type.
- complexTypeName
- String
The name of the complex type.
- collection
- Boolean
Indicates whether the property represents a collection.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
- Attributes
Applies to
AddComplexProperty(String, Type, Type, String, Boolean, Boolean)
Adds a property to this type.
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
Parameters
- name
- String
The name of the property to add.
- propertyType
- Type
The property type.
- complexType
- Type
The type of value the property will hold.
- complexTypeName
- String
The name of the complex type.
- collection
- Boolean
Indicates whether the property represents a collection.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
Applies to
AddComplexProperty(String, Type, MemberInfo, Type, String, Boolean, Boolean)
Adds a property to this type.
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
Parameters
- name
- String
The name of the property to add.
- propertyType
- Type
The property type.
- memberInfo
- MemberInfo
The corresponding CLR type member.
An indexer with a String parameter and Object return type can be used.
- complexType
- Type
The type of value the property will hold.
- complexTypeName
- String
The name of the complex type.
- collection
- Boolean
Indicates whether the property represents a collection.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
Applies to
Entity Framework