IMutableEntityType.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) |
Adds a service property to this entity type. |
AddServiceProperty(MemberInfo, Type) |
Adds a service property to this entity type. |
AddServiceProperty(MemberInfo)
Adds a service property to this entity type.
public Microsoft.EntityFrameworkCore.Metadata.IMutableServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo);
abstract member AddServiceProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo) As IMutableServiceProperty
Parameters
- memberInfo
- MemberInfo
The PropertyInfo or FieldInfo of the property to add.
Returns
The newly created service property.
Applies to
AddServiceProperty(MemberInfo, Type)
Adds a service property to this entity type.
public Microsoft.EntityFrameworkCore.Metadata.IMutableServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo, Type? serviceType = default);
abstract member AddServiceProperty : System.Reflection.MemberInfo * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo, Optional serviceType As Type = Nothing) As IMutableServiceProperty
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.
Returns
The newly created service property.
Applies to
Entity Framework