Table of Contents

Method AddFilter

Namespace
Innova.Data.Entity.QueryFilterBuilder
Assembly
Innova.Data.dll

AddFilter(Expression<Func<TEntity, bool>>, bool)

Adding a filter to a given query filter builder.

IQueryFilterBuilder<TEntity> AddFilter(Expression<Func<TEntity, bool>> expression, bool active = true)

Parameters

expression Expression<Func<TEntity, bool>>

A LINQ predicate expression.

active bool

Indication of whether the filter should be applied, this parameter can be controlled by a service injected into DbContext.

Returns

IQueryFilterBuilder<TEntity>

A QueryFilterBuilder instance to chain methods.

AddFilter(string, Expression<Func<TEntity, bool>>, bool)

Adding a filter to a given query filter builder.

IQueryFilterBuilder<TEntity> AddFilter(string filterName, Expression<Func<TEntity, bool>> expression, bool active = true)

Parameters

filterName string

The unique name of the filter.

expression Expression<Func<TEntity, bool>>

A LINQ predicate expression.

active bool

Indication of whether the filter should be applied, this parameter can be controlled by a service injected into DbContext.

Returns

IQueryFilterBuilder<TEntity>

A QueryFilterBuilder instance to chain methods.