共用方式為


RelationalForeignKeyExtensions.SetConstraintName 方法

定義

多載

SetConstraintName(IMutableForeignKey, String)

設定外鍵條件約束名稱。

SetConstraintName(IConventionForeignKey, String, Boolean)

設定外鍵條件約束名稱。

SetConstraintName(IMutableForeignKey, String)

設定外鍵條件約束名稱。

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)

參數

foreignKey
IMutableForeignKey

外部索引鍵。

value
String

要設定的值。

適用於

SetConstraintName(IConventionForeignKey, String, Boolean)

設定外鍵條件約束名稱。

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

參數

foreignKey
IConventionForeignKey

外部索引鍵。

value
String

要設定的值。

fromDataAnnotation
Boolean

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

傳回

設定的名稱。

適用於