PropertyBuilder 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供用于配置 . 的 IMutableProperty简单 API。
public class PropertyBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.IMutableModel>, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalPropertyBuilder>
[System.Runtime.CompilerServices.Nullable(0)]
public class PropertyBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder>
public class PropertyBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalPropertyBuilder>
public class PropertyBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder>
type PropertyBuilder = class
interface IInfrastructure<IMutableModel>
interface IInfrastructure<InternalPropertyBuilder>
[<System.Runtime.CompilerServices.Nullable(0)>]
type PropertyBuilder = class
interface IInfrastructure<IConventionPropertyBuilder>
type PropertyBuilder = class
interface IInfrastructure<InternalPropertyBuilder>
type PropertyBuilder = class
interface IInfrastructure<IConventionPropertyBuilder>
Public Class PropertyBuilder
Implements IInfrastructure(Of IMutableModel), IInfrastructure(Of InternalPropertyBuilder)
Public Class PropertyBuilder
Implements IInfrastructure(Of IConventionPropertyBuilder)
Public Class PropertyBuilder
Implements IInfrastructure(Of InternalPropertyBuilder)
- 继承
-
PropertyBuilder
- 派生
- 特性
- 实现
-
IInfrastructure<IMutableModel> IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalPropertyBuilder> IInfrastructure<IConventionPropertyBuilder>
注解
使用 ModelBuilder API 时,此类的实例会从方法返回,并且不会在应用程序代码中直接构造此类实例。
有关详细信息和示例,请参阅 建模实体类型和关系 。
构造函数
| 名称 | 说明 |
|---|---|
| PropertyBuilder(IMutableProperty) |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
| PropertyBuilder(InternalPropertyBuilder) |
此 API 支持Entity Framework Core基础结构,不打算直接从代码使用。 此 API 可能会在将来的版本中更改或删除。 |
属性
| 名称 | 说明 |
|---|---|
| Metadata |
正在配置的属性。 |
方法
显式接口实现
| 名称 | 说明 |
|---|---|
| IInfrastructure<IConventionPropertyBuilder>.Instance |
用于配置属性的内部生成器。 |
| IInfrastructure<IMutableModel>.Instance |
属性所属的模型。 |
| IInfrastructure<InternalPropertyBuilder>.Instance |
用于配置属性的内部生成器。 |