Share via


RelationalKeyExtensions.SetName Method

Definition

Overloads

SetName(IMutableKey, String)

Sets the key constraint name for this key.

SetName(IConventionKey, String, Boolean)

Sets the key constraint name for this key.

SetName(IMutableKey, String)

Sets the key constraint name for this key.

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)

Parameters

key
IMutableKey

The key.

name
String

The value to set.

Applies to

SetName(IConventionKey, String, Boolean)

Sets the key constraint name for this key.

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

Parameters

key
IConventionKey

The key.

name
String

The value to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured name.

Applies to