MutablePropertyExtensions.GetContainingPrimaryKey(IMutableProperty) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Use FindContainingPrimaryKey()
取得使用該屬性的主鍵(包括包含該屬性的複合主鍵)。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableKey GetContainingPrimaryKey(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
[System.Obsolete("Use FindContainingPrimaryKey()")]
public static Microsoft.EntityFrameworkCore.Metadata.IMutableKey GetContainingPrimaryKey(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
static member GetContainingPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
[<System.Obsolete("Use FindContainingPrimaryKey()")>]
static member GetContainingPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
<Extension()>
Public Function GetContainingPrimaryKey (property As IMutableProperty) As IMutableKey
參數
- property
- IMutableProperty
取得主鑰匙的屬性。
傳回
使用此屬性的主鍵,或 null 若它不屬於主鍵。
- 屬性