RelationalEntityTypeExtensions.SetTableName Method

Definition

Overloads

SetTableName(IMutableEntityType, String)

Sets the name of the table to which the entity type is mapped.

SetTableName(IConventionEntityType, String, Boolean)

Sets the name of the table to which the entity type is mapped.

SetTableName(IMutableEntityType, String)

Sets the name of the table to which the entity type is mapped.

public static void SetTableName (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name);
public static void SetTableName (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? name);
static member SetTableName : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> unit
<Extension()>
Public Sub SetTableName (entityType As IMutableEntityType, name As String)

Parameters

entityType
IMutableEntityType

The entity type to set the table name for.

name
String

The name to set.

Applies to

SetTableName(IConventionEntityType, String, Boolean)

Sets the name of the table to which the entity type is mapped.

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

Parameters

entityType
IConventionEntityType

The entity type to set the table name for.

name
String

The name to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured table name.

Applies to