IMutableEntityType.AddKey 方法

定义

重载

AddKey(IMutableProperty)

向此实体类型添加新的备用键。

AddKey(IReadOnlyList<IMutableProperty>)

向此实体类型添加新的备用键。

AddKey(IMutableProperty)

向此实体类型添加新的备用键。

public virtual Microsoft.EntityFrameworkCore.Metadata.IMutableKey AddKey (Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
abstract member AddKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
override this.AddKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
Public Overridable Function AddKey (property As IMutableProperty) As IMutableKey

参数

property
IMutableProperty

要用作备用键的属性。

返回

新创建的密钥。

适用于

AddKey(IReadOnlyList<IMutableProperty>)

向此实体类型添加新的备用键。

public Microsoft.EntityFrameworkCore.Metadata.IMutableKey AddKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties);
abstract member AddKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
Public Function AddKey (properties As IReadOnlyList(Of IMutableProperty)) As IMutableKey

参数

properties
IReadOnlyList<IMutableProperty>

构成备用键的属性。

返回

新创建的密钥。

适用于