IConventionEntityType.AddServiceProperty 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
AddServiceProperty(MemberInfo, Type, Boolean) |
Adds a service property to this entity type. |
AddServiceProperty(MemberInfo, Boolean) |
Adds a service property to this entity type. |
AddServiceProperty(MemberInfo, Type, Boolean)
Adds a service property to this entity type.
public Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo, Type? serviceType = default, bool fromDataAnnotation = false);
abstract member AddServiceProperty : System.Reflection.MemberInfo * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo, Optional serviceType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionServiceProperty
Parameters
- memberInfo
- MemberInfo
The PropertyInfo or FieldInfo of the property to add.
- serviceType
- Type
The type of the service, or null
to use the type of the member.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created service property.
Applies to
AddServiceProperty(MemberInfo, Boolean)
Adds a service property to this entity type.
public Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo, bool fromDataAnnotation = false);
abstract member AddServiceProperty : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionServiceProperty
Parameters
- memberInfo
- MemberInfo
The PropertyInfo or FieldInfo of the property to add.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The newly created service 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: