ForeignKeyIndexConvention.AreIndexedBy 方法

定义

返回一个值,该值指示现有索引是否已涵盖给定属性。

protected virtual bool AreIndexedBy (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool unique, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> coveringIndexProperties, bool coveringIndexUnique);
abstract member AreIndexedBy : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> bool
override this.AreIndexedBy : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> bool
Protected Overridable Function AreIndexedBy (properties As IReadOnlyList(Of IConventionProperty), unique As Boolean, coveringIndexProperties As IReadOnlyList(Of IConventionProperty), coveringIndexUnique As Boolean) As Boolean

参数

properties
IReadOnlyList<IConventionProperty>

要检查的属性。

unique
Boolean

要创建的索引是否应是唯一的。

coveringIndexProperties
IReadOnlyList<IConventionProperty>

现有索引的属性。

coveringIndexUnique
Boolean

现有索引是否唯一。

返回

true 如果现有索引涵盖给定属性,则为 。

适用于