共用方式為


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

指出是否使用資料批註來指定組態。

傳回

設定的名稱。

適用於