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
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor