語言

ServiceParameterBinding 類別

定義

描述從 EF 依賴注入服務或元資料類型(可能同時具有或沒有關聯 IServiceProperty)綁定到建構子、工廠方法或類似參數的綁定方式。

[System.Runtime.CompilerServices.Nullable(0)]
public abstract class ServiceParameterBinding : Microsoft.EntityFrameworkCore.Metadata.ParameterBinding
public abstract class ServiceParameterBinding : Microsoft.EntityFrameworkCore.Metadata.ParameterBinding
[<System.Runtime.CompilerServices.Nullable(0)>]
type ServiceParameterBinding = class
    inherit ParameterBinding
type ServiceParameterBinding = class
    inherit ParameterBinding
Public MustInherit Class ServiceParameterBinding
Inherits ParameterBinding
繼承
ServiceParameterBinding
衍生
屬性

備註

更多資訊與範例請參閱 帶有構造子的實體類型 。

建構函式

名稱 Description
ServiceParameterBinding(Type, Type, IPropertyBase)

為該服務類型或元資料類型建立新 ServiceParameterBinding 實例。

ServiceParameterBinding(Type, Type, IPropertyBase[])

為該服務類型或元資料類型建立新 ServiceParameterBinding 實例。

屬性

名稱 Description
ConsumedProperties

這些由綁定處理的屬性,因此不需要以其他方式設定。

(繼承來源 ParameterBinding)
ParameterType

參數 CLR 類型。

(繼承來源 ParameterBinding)
ServiceDelegate

一個委派,在實體實例上設定 CLR 服務屬性。

ServiceType

EF 內部服務 CLR 類型。

方法

名稱 Description
BindToParameter(Expression, Expression)

建立一棵表達式樹,表示屬性值從物質化表達式綁定到建構子、工廠方法等參數的過程。

BindToParameter(ParameterBindingInfo)

建立一棵表達式樹,表示屬性值從物質化表達式綁定到建構子、工廠方法等參數的過程。

With(IPropertyBase[])

建立包含所消耗屬性的副本。

(繼承來源 ParameterBinding)

適用於