MutableEntityTypeExtensions.AddKey 方法

定義

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

public static Microsoft.EntityFrameworkCore.Metadata.IMutableKey AddKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
static member AddKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
<Extension()>
Public Function AddKey (entityType As IMutableEntityType, property As IMutableProperty) As IMutableKey

參數

entityType
IMutableEntityType

實體類型。

property
IMutableProperty

做為替代索引鍵的屬性。

傳回

新建立的金鑰。

適用於