Share via


RelationalIndexBuilderExtensions.HasName Method

Definition

Overloads

HasName(IndexBuilder, String)
Obsolete.

Configures the name of the index in the database when targeting a relational database.

HasName(IConventionIndexBuilder, String, Boolean)
Obsolete.

Configures the name of the index in the database when targeting a relational database.

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

Configures the name of the index in the database when targeting a relational database.

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

Caution

Use HasDatabaseName() instead.

Configures the name of the index in the database when targeting a relational database.

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

Parameters

indexBuilder
IndexBuilder

The builder for the index being configured.

name
String

The name of the index.

Returns

A builder to further configure the index.

Attributes

Remarks

See Indexes for more information and examples.

Applies to

HasName(IConventionIndexBuilder, String, Boolean)

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

Caution

Use HasDatabaseName() instead.

Configures the name of the index in the database when targeting a relational database.

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

Parameters

indexBuilder
IConventionIndexBuilder

The builder for the index being configured.

name
String

The name of the index.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Attributes

Remarks

See Indexes for more information.

Applies to

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

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

Caution

Use HasDatabaseName() instead.

Configures the name of the index in the database when targeting a relational database.

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)

Type Parameters

TEntity

The entity type being configured.

Parameters

indexBuilder
IndexBuilder<TEntity>

The builder for the index being configured.

name
String

The name of the index.

Returns

IndexBuilder<TEntity>

A builder to further configure the index.

Attributes

Remarks

See Indexes for more information.

Applies to