Freigeben über


RelationalKeyExtensions.SetName Methode

Definition

Überlädt

SetName(IMutableKey, String)

Legt den Namen der Schlüsseleinschränkung für diesen Schlüssel fest.

SetName(IConventionKey, String, Boolean)

Legt den Namen der Schlüsseleinschränkung für diesen Schlüssel fest.

SetName(IMutableKey, String)

Legt den Namen der Schlüsseleinschränkung für diesen Schlüssel fest.

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)

Parameter

key
IMutableKey

Der Schlüssel.

name
String

Der festzulegende Wert.

Gilt für:

SetName(IConventionKey, String, Boolean)

Legt den Namen der Schlüsseleinschränkung für diesen Schlüssel fest.

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

Parameter

key
IConventionKey

Der Schlüssel.

name
String

Der festzulegende Wert.

fromDataAnnotation
Boolean

Gibt an, ob die Konfiguration mithilfe einer Datenanmerkung angegeben wurde.

Gibt zurück

Der konfigurierte Name.

Gilt für: