RelationalKeyExtensions.SetName 方法

定义

重载

SetName(IMutableKey, String)

设置此键的键约束名称。

SetName(IConventionKey, String, Boolean)

设置此键的键约束名称。

SetName(IMutableKey, String)

设置此键的键约束名称。

public static void SetName (this Microsoft.EntityFrameworkCore.Metadata.IMutableKey key, string name);
public static void SetName (this Microsoft.EntityFrameworkCore.Metadata.IMutableKey key, string? name);
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IMutableKey * string -> unit
<Extension()>
Public Sub SetName (key As IMutableKey, name As String)

参数

key
IMutableKey

键。

name
String

要设置的值。

适用于

SetName(IConventionKey, String, Boolean)

设置此键的键约束名称。

public static void SetName (this Microsoft.EntityFrameworkCore.Metadata.IConventionKey key, string name, bool fromDataAnnotation = false);
public static string SetName (this Microsoft.EntityFrameworkCore.Metadata.IConventionKey key, string name, bool fromDataAnnotation = false);
public static string? SetName (this Microsoft.EntityFrameworkCore.Metadata.IConventionKey key, string? name, bool fromDataAnnotation = false);
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IConventionKey * string * bool -> unit
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IConventionKey * string * bool -> string
<Extension()>
Public Sub SetName (key As IConventionKey, name As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetName (key As IConventionKey, name As String, Optional fromDataAnnotation As Boolean = false) As String

参数

key
IConventionKey

键。

name
String

要设置的值。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

配置的名称。

适用于