IMutableEntityType.AddServiceProperty 方法

定義

多載

AddServiceProperty(MemberInfo)

將服務屬性新增至這個實體類型。

AddServiceProperty(MemberInfo, Type)

將服務屬性新增至這個實體類型。

AddServiceProperty(MemberInfo)

將服務屬性新增至這個實體類型。

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

參數

memberInfo
MemberInfo

PropertyInfo 加入之 屬性的 或 FieldInfo

傳回

新建立的服務屬性。

適用於

AddServiceProperty(MemberInfo, 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

參數

memberInfo
MemberInfo

PropertyInfo 加入之 屬性的 或 FieldInfo

serviceType
Type

服務的型別,或使用 null 成員的類型。

傳回

新建立的服務屬性。

適用於