Method AddFilter
- Namespace
- Innova.Data.Entity.QueryFilterBuilder
- Assembly
- Innova.Data.dll
AddFilter(Expression<Func<TEntity, bool>>, bool)
Adds a query filter with the specified expression.
public IQueryFilterBuilder<TEntity> AddFilter(Expression<Func<TEntity, bool>> expression, bool active = true)
Parameters
expression
Expression<Func<TEntity, bool>>The expression representing the filter.
active
boolA value indicating whether the filter is active.
Returns
- IQueryFilterBuilder<TEntity>
The query filter builder.
AddFilter(string, Expression<Func<TEntity, bool>>, bool)
Adds a query filter with the specified name and expression.
public IQueryFilterBuilder<TEntity> AddFilter(string filterName, Expression<Func<TEntity, bool>> expression, bool active = true)
Parameters
filterName
stringThe name of the filter.
expression
Expression<Func<TEntity, bool>>The expression representing the filter.
active
boolA value indicating whether the filter is active.
Returns
- IQueryFilterBuilder<TEntity>
The query filter builder.