Freigeben über


RelationalForeignKeyExtensions.SetConstraintName Methode

Definition

Überlädt

SetConstraintName(IMutableForeignKey, String)

Legt den Namen der Fremdschlüsseleinschränkung fest.

SetConstraintName(IConventionForeignKey, String, Boolean)

Legt den Namen der Fremdschlüsseleinschränkung fest.

SetConstraintName(IMutableForeignKey, String)

Legt den Namen der Fremdschlüsseleinschränkung fest.

public static void SetConstraintName (this Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey foreignKey, string value);
public static void SetConstraintName (this Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey foreignKey, string? value);
static member SetConstraintName : Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey * string -> unit
<Extension()>
Public Sub SetConstraintName (foreignKey As IMutableForeignKey, value As String)

Parameter

foreignKey
IMutableForeignKey

Der Fremdschlüssel.

value
String

Der festzulegende Wert.

Gilt für:

SetConstraintName(IConventionForeignKey, String, Boolean)

Legt den Namen der Fremdschlüsseleinschränkung fest.

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

Parameter

foreignKey
IConventionForeignKey

Der Fremdschlüssel.

value
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: