共用方式為


ConventionEntityTypeExtensions.GetDeclaredIndexes 方法

定義

取得在指定 IConventionEntityType 上宣告的所有索引。

這個方法不會傳回在基底類型上宣告的索引。 在逐一查看所有實體類型時,它很有用,以避免多次處理相同的索引。 使用 GetForeignKeys() 也傳回在基底類型上宣告的索引。

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionIndex> GetDeclaredIndexes (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
static member GetDeclaredIndexes : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.IConventionIndex>
<Extension()>
Public Function GetDeclaredIndexes (entityType As IConventionEntityType) As IEnumerable(Of IConventionIndex)

參數

entityType
IConventionEntityType

實體類型。

傳回

宣告的索引。

適用於