RelationalForeignKeyExtensions.SetConstraintName Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetConstraintName(IMutableForeignKey, String) |
Sets the foreign key constraint name. |
SetConstraintName(IConventionForeignKey, String, Boolean) |
Sets the foreign key constraint name. |
SetConstraintName(IMutableForeignKey, String)
Sets the foreign key constraint name.
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)
Parameters
- foreignKey
- IMutableForeignKey
The foreign key.
- value
- String
The value to set.
Applies to
SetConstraintName(IConventionForeignKey, String, Boolean)
Sets the foreign key constraint name.
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
Parameters
- foreignKey
- IConventionForeignKey
The foreign key.
- value
- String
The value to set.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The configured name.
Applies to
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Entity Framework