RelationalIndexBuilderExtensions.HasName 方法

定义

重载

HasName(IndexBuilder, String)
已过时.

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

HasName(IConventionIndexBuilder, String, Boolean)
已过时.

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

HasName<TEntity>(IndexBuilder<TEntity>, String)
已过时.

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

HasName(IndexBuilder, String)

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

注意

Use HasDatabaseName() instead.

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

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder HasName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, string name);
[System.Obsolete("Use HasDatabaseName() instead.")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder HasName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, string name);
[System.Obsolete("Use HasDatabaseName() instead.")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder HasName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, string? name);
static member HasName : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
[<System.Obsolete("Use HasDatabaseName() instead.")>]
static member HasName : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function HasName (indexBuilder As IndexBuilder, name As String) As IndexBuilder

参数

indexBuilder
IndexBuilder

要配置的索引的生成器。

name
String

索引的名称。

返回

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

属性

注解

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

适用于

HasName(IConventionIndexBuilder, String, Boolean)

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

注意

Use HasDatabaseName() instead.

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

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

参数

indexBuilder
IConventionIndexBuilder

要配置的索引的生成器。

name
String

索引的名称。

fromDataAnnotation
Boolean

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

返回

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

属性

注解

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

适用于

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

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

注意

Use HasDatabaseName() instead.

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

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

类型参数

TEntity

要配置的实体类型。

参数

indexBuilder
IndexBuilder<TEntity>

要配置的索引的生成器。

name
String

索引的名称。

返回

IndexBuilder<TEntity>

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

属性

注解

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

适用于