共用方式為


RuntimeEntityType.AddKey(IReadOnlyList<RuntimeProperty>) 方法

定義

將新的替代索引鍵新增至這個實體類型。

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeKey AddKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty> properties);
abstract member AddKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty> -> Microsoft.EntityFrameworkCore.Metadata.RuntimeKey
override this.AddKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty> -> Microsoft.EntityFrameworkCore.Metadata.RuntimeKey
Public Overridable Function AddKey (properties As IReadOnlyList(Of RuntimeProperty)) As RuntimeKey

參數

properties
IReadOnlyList<RuntimeProperty>

構成替代索引鍵的屬性。

傳回

新建立的金鑰。

適用於