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

屬性將保留的數值型別。

傳回

新建立的屬性。

適用於