CoreStrings.KeyReadOnly(Object, Object) 方法

定义

属性“{1_entityType}。{0_property}'是密钥的一部分,因此不能修改或标记为已修改。 若要使用标识外键更改现有实体的主体,请首先删除依赖项并调用 SaveChanges,然后将依赖项与新主体相关联。

public static string KeyReadOnly (object property, object entityType);
public static string KeyReadOnly (object? property, object? entityType);
static member KeyReadOnly : obj * obj -> string
Public Shared Function KeyReadOnly (property As Object, entityType As Object) As String

参数

property
Object
entityType
Object

返回

适用于