RelationalEntityTypeExtensions.SetTableName 方法

定义

重载

SetTableName(IMutableEntityType, String)

设置实体类型映射到的表的名称。

SetTableName(IConventionEntityType, String, Boolean)

设置实体类型映射到的表的名称。

SetTableName(IMutableEntityType, String)

设置实体类型映射到的表的名称。

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)

参数

entityType
IMutableEntityType

要为其设置表名称的实体类型。

name
String

要设置的名称。

适用于

SetTableName(IConventionEntityType, String, Boolean)

设置实体类型映射到的表的名称。

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

参数

entityType
IConventionEntityType

要为其设置表名称的实体类型。

name
String

要设置的名称。

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

配置的表名称。

适用于