MutableEntityTypeExtensions.AddIndexerProperty 方法

定义

将索引器备份的属性添加到此实体类型。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddIndexerProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name, Type propertyType);
static member AddIndexerProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddIndexerProperty (entityType As IMutableEntityType, name As String, propertyType As Type) As IMutableProperty

参数

entityType
IMutableEntityType

实体类型。

name
String

要添加的属性的名称。

propertyType
Type

属性将保留的值的类型。

返回

新建的属性。

适用于