RelationalIndexBuilderExtensions.HasFilter Method

Definition

Overloads

HasFilter(IndexBuilder, String)

Configures the filter expression for the index.

HasFilter(IConventionIndexBuilder, String, Boolean)

Configures the filter expression for the index.

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

Configures the filter expression for the index.

HasFilter(IndexBuilder, String)

Configures the filter expression for the index.

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

Parameters

indexBuilder
IndexBuilder

The builder for the index being configured.

sql
String

The filter expression for the index.

Returns

IndexBuilder

A builder to further configure the index.

Applies to

HasFilter(IConventionIndexBuilder, String, Boolean)

Configures the filter expression for the index.

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

Parameters

indexBuilder
IConventionIndexBuilder

The builder for the index being configured.

sql
String

The filter expression for the index.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionIndexBuilder

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

Applies to

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

Configures the filter expression for the index.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> HasFilter<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, string sql);
static member HasFilter : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function HasFilter(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), sql 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.

sql
String

The filter expression for the index.

Returns

IndexBuilder<TEntity>

A builder to further configure the index.

Applies to