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

代替キーとして使用する プロパティ。

戻り値

新しく作成されたキー。

適用対象