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

The LINQ predicate expression.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to