Udostępnij za pośrednictwem


RelationalForeignKeyExtensions.SetConstraintName Metoda

Definicja

Przeciążenia

SetConstraintName(IMutableForeignKey, String)

Ustawia nazwę ograniczenia klucza obcego.

SetConstraintName(IConventionForeignKey, String, Boolean)

Ustawia nazwę ograniczenia klucza obcego.

SetConstraintName(IMutableForeignKey, String)

Ustawia nazwę ograniczenia klucza obcego.

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)

Parametry

foreignKey
IMutableForeignKey

Klucz obcy.

value
String

Wartość do ustawienia.

Dotyczy

SetConstraintName(IConventionForeignKey, String, Boolean)

Ustawia nazwę ograniczenia klucza obcego.

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

Parametry

foreignKey
IConventionForeignKey

Klucz obcy.

value
String

Wartość do ustawienia.

fromDataAnnotation
Boolean

Wskazuje, czy konfiguracja została określona przy użyciu adnotacji danych.

Zwraca

Skonfigurowana nazwa.

Dotyczy