EntityTypeBuilder.HasQueryFilter(LambdaExpression) EntityTypeBuilder.HasQueryFilter(LambdaExpression) EntityTypeBuilder.HasQueryFilter(LambdaExpression) Method

Definition

Specifies a LINQ predicate expression that will automatically be applied to any queries targeting this entity type.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder HasQueryFilter (System.Linq.Expressions.LambdaExpression filter);
abstract member HasQueryFilter : System.Linq.Expressions.LambdaExpression -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.HasQueryFilter : System.Linq.Expressions.LambdaExpression -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function HasQueryFilter (filter As LambdaExpression) As EntityTypeBuilder

Parameters

filter
LambdaExpression LambdaExpression LambdaExpression

The LINQ predicate expression.

Returns

An object that can be used to configure the entity type.

Applies to