语言

DependencyInjectionParameterBinding 类

定义

描述从 EF 内部依赖项注入服务(可能或可能也不具有和关联 IServiceProperty)到构造函数、工厂方法或类似参数的绑定。

[System.Runtime.CompilerServices.Nullable(0)]
public class DependencyInjectionParameterBinding : Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBinding
public class DependencyInjectionParameterBinding : Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBinding
[<System.Runtime.CompilerServices.Nullable(0)>]
type DependencyInjectionParameterBinding = class
    inherit ServiceParameterBinding
type DependencyInjectionParameterBinding = class
    inherit ServiceParameterBinding
Public Class DependencyInjectionParameterBinding
Inherits ServiceParameterBinding
继承
DependencyInjectionParameterBinding
派生
特性

注解

有关详细信息和示例,请参阅 包含构造函数的实体类型 。

构造函数

名称 说明
DependencyInjectionParameterBinding(Type, Type, IPropertyBase)

DependencyInjectionParameterBinding为给定的服务类型创建新实例。

DependencyInjectionParameterBinding(Type, Type, IPropertyBase[])

DependencyInjectionParameterBinding为给定的服务类型创建新实例。

属性

名称 说明
ConsumedProperties

此绑定处理的属性,因此无需以其他方式设置。

(继承自 ParameterBinding)
ParameterType

参数 CLR 类型。

(继承自 ParameterBinding)
ServiceDelegate

在实体实例上设置 CLR 服务属性的委托。

ServiceDelegate

在实体实例上设置 CLR 服务属性的委托。

(继承自 ServiceParameterBinding)
ServiceType

EF 内部服务 CLR 类型。

(继承自 ServiceParameterBinding)

方法

名称 说明
BindToParameter(Expression, Expression)

创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。

BindToParameter(ParameterBindingInfo)

创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。

(继承自 ServiceParameterBinding)
With(IPropertyBase[])

创建包含给定已使用属性的副本。

适用于