MutableEntityTypeExtensions.AddProperty 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddProperty(IMutableEntityType, MemberInfo) |
将属性添加到此实体类型。 |
AddProperty(IMutableEntityType, PropertyInfo) |
向此实体添加属性。 |
AddProperty(IMutableEntityType, String) |
将属性添加到此实体类型。 |
AddProperty(IMutableEntityType, String, Type) |
将属性添加到此实体类型。 |
AddProperty(IMutableEntityType, MemberInfo)
将属性添加到此实体类型。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.MemberInfo memberInfo);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, memberInfo As MemberInfo) As IMutableProperty
参数
- entityType
- IMutableEntityType
实体类型。
- memberInfo
- MemberInfo
实体类上的相应成员。
返回
新创建的属性。
适用于
AddProperty(IMutableEntityType, PropertyInfo)
向此实体添加属性。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.PropertyInfo propertyInfo);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.PropertyInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, propertyInfo As PropertyInfo) As IMutableProperty
参数
- entityType
- IMutableEntityType
要向其添加属性的实体类型。
- propertyInfo
- PropertyInfo
实体类中的相应属性。
返回
新创建的属性。
适用于
AddProperty(IMutableEntityType, String)
将属性添加到此实体类型。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, name As String) As IMutableProperty
参数
- entityType
- IMutableEntityType
实体类型。
- name
- String
要添加的属性的名称。
返回
新创建的属性。
适用于
AddProperty(IMutableEntityType, String, Type)
将属性添加到此实体类型。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name, Type propertyType);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, name As String, propertyType As Type) As IMutableProperty
参数
- entityType
- IMutableEntityType
实体类型。
- name
- String
要添加的属性的名称。
- propertyType
- Type
属性将保留的值的类型。
返回
新创建的属性。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈