ContextParameterBinding 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
描述与构造函数、工厂方法或类似参数的绑定 DbContext(可能或可能也可能不具有和关联 IServiceProperty)。
[System.Runtime.CompilerServices.Nullable(0)]
public class ContextParameterBinding : Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBinding
public class ContextParameterBinding : Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBinding
[<System.Runtime.CompilerServices.Nullable(0)>]
type ContextParameterBinding = class
inherit ServiceParameterBinding
type ContextParameterBinding = class
inherit ServiceParameterBinding
Public Class ContextParameterBinding
Inherits ServiceParameterBinding
- 继承
- 特性
注解
有关详细信息和示例,请参阅 包含构造函数的实体类型 。
构造函数
| 名称 | 说明 |
|---|---|
| ContextParameterBinding(Type, IPropertyBase) |
ServiceParameterBinding为给定的服务类型创建新实例。 |
| ContextParameterBinding(Type, IPropertyBase[]) |
ServiceParameterBinding为给定的服务类型创建新实例。 |
属性
| 名称 | 说明 |
|---|---|
| ConsumedProperties |
此绑定处理的属性,因此无需以其他方式设置。 (继承自 ParameterBinding) |
| ParameterType |
参数 CLR 类型。 (继承自 ParameterBinding) |
| ServiceDelegate |
在实体实例上设置 CLR 服务属性的委托。 (继承自 ServiceParameterBinding) |
| ServiceType |
EF 内部服务 CLR 类型。 (继承自 ServiceParameterBinding) |
方法
| 名称 | 说明 |
|---|---|
| BindToParameter(Expression, Expression) |
创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。 |
| BindToParameter(ParameterBindingInfo) |
创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。 (继承自 ServiceParameterBinding) |
| With(IPropertyBase[]) |
创建包含给定已使用属性的副本。 |