语言

MutablePropertyExtensions.GetContainingPrimaryKey(IMutableProperty) 方法

定义

注意

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 它不是主键的一部分。

特性

适用于