MutableEntityTypeExtensions.AddProperty 方法

定义

重载

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

属性将保留的值的类型。

返回

新创建的属性。

适用于