ConventionEntityTypeExtensions.AddProperty 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
AddProperty(IConventionEntityType, MemberInfo, Boolean) |
Adds a property to this entity type. |
AddProperty(IConventionEntityType, String, Boolean) |
Adds a property to this entity type. |
AddProperty(IConventionEntityType, String, Type, Boolean, Boolean) |
Adds a property to this entity type. |
AddProperty(IConventionEntityType, MemberInfo, Boolean)
Adds a property to this entity type.
public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Reflection.MemberInfo memberInfo, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, memberInfo As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionProperty
Parameters
- entityType
- IConventionEntityType
The entity type.
- memberInfo
- MemberInfo
The corresponding member on the entity class.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
Applies to
AddProperty(IConventionEntityType, String, Boolean)
Adds a property to this entity type.
public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionProperty
Parameters
- entityType
- IConventionEntityType
The entity type.
- name
- String
The name of the property to add.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
Applies to
AddProperty(IConventionEntityType, String, Type, Boolean, Boolean)
Adds a property to this entity type.
public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, Type propertyType, bool setTypeConfigurationSource = true, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, name As String, propertyType As Type, Optional setTypeConfigurationSource As Boolean = true, Optional fromDataAnnotation As Boolean = false) As IConventionProperty
Parameters
- entityType
- IConventionEntityType
The entity type.
- name
- String
The name of the property to add.
- propertyType
- Type
The type of value the property will hold.
- setTypeConfigurationSource
- Boolean
Indicates whether the type configuration source should be set.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created property.
Applies to
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: