QueryTypeBuilder<TQuery>.HasQueryFilter Method

Definition

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

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.QueryTypeBuilder<TQuery> HasQueryFilter (System.Linq.Expressions.Expression<Func<TQuery,bool>> filter);
override this.HasQueryFilter : System.Linq.Expressions.Expression<Func<'Query, bool>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.QueryTypeBuilder<'Query (requires 'Query : null)>
Public Overridable Function HasQueryFilter (filter As Expression(Of Func(Of TQuery, Boolean))) As QueryTypeBuilder(Of TQuery)

Parameters

filter
Expression<Func<TQuery,Boolean>>

The LINQ predicate expression.

Returns

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

Applies to