RelationalIndexBuilderExtensions.HasDatabaseName Method

Definition

Overloads

HasDatabaseName(IndexBuilder, String)

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

HasDatabaseName(IConventionIndexBuilder, String, Boolean)

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

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

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

HasDatabaseName(IndexBuilder, String)

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

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

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.

Remarks

See Indexes for more information and examples.

Applies to

HasDatabaseName(IConventionIndexBuilder, String, Boolean)

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

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

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.

Remarks

See Indexes for more information and examples.

Applies to

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

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

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)

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.

Remarks

See Indexes for more information and examples.

Applies to