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 则为 。

属性

适用于