RelationalIndexBuilderExtensions.HasDatabaseName 方法

定义

重载

HasDatabaseName(IndexBuilder, String)

以关系数据库为目标时,在数据库中配置索引的名称。

HasDatabaseName(IConventionIndexBuilder, String, Boolean)

以关系数据库为目标时,在数据库中配置索引的名称。

HasDatabaseName<TEntity>(IndexBuilder<TEntity>, String)

以关系数据库为目标时,在数据库中配置索引的名称。

HasDatabaseName(IndexBuilder, String)

Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs

以关系数据库为目标时,在数据库中配置索引的名称。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder HasDatabaseName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, string name);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder HasDatabaseName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, string? name);
static member HasDatabaseName : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function HasDatabaseName (indexBuilder As IndexBuilder, name As String) As IndexBuilder

参数

indexBuilder
IndexBuilder

要配置的索引的生成器。

name
String

索引的名称。

返回

用于进一步配置索引的生成器。

注解

有关详细信息和示例 ,请参阅索引

适用于

HasDatabaseName(IConventionIndexBuilder, String, Boolean)

Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs

以关系数据库为目标时,在数据库中配置索引的名称。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder HasDatabaseName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, string name, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder? HasDatabaseName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, string? name, bool fromDataAnnotation = false);
static member HasDatabaseName : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder
<Extension()>
Public Function HasDatabaseName (indexBuilder As IConventionIndexBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionIndexBuilder

参数

indexBuilder
IConventionIndexBuilder

要配置的索引的生成器。

name
String

索引的名称。

fromDataAnnotation
Boolean

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

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

注解

有关详细信息和示例 ,请参阅索引

适用于

HasDatabaseName<TEntity>(IndexBuilder<TEntity>, String)

Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs
Source:
RelationalIndexBuilderExtensions.cs

以关系数据库为目标时,在数据库中配置索引的名称。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> HasDatabaseName<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, string name);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> HasDatabaseName<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, string? name);
static member HasDatabaseName : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function HasDatabaseName(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), name As String) As IndexBuilder(Of TEntity)

类型参数

TEntity

要配置的实体类型。

参数

indexBuilder
IndexBuilder<TEntity>

要配置的索引的生成器。

name
String

索引的名称。

返回

IndexBuilder<TEntity>

用于进一步配置索引的生成器。

注解

有关详细信息和示例 ,请参阅索引

适用于