CommonCRUDServiceTEntity, TKey, TInput, TFilterSetCategoryFilterAsync Method

设置类别过滤条件。

Definition

Namespace: QuickAdmin.Service.CRUD
Assembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.13
C#
protected virtual Task<bool> SetCategoryFilterAsync(
	ISelect<TEntity> iSel,
	TFilter filter,
	CancellationToken cancellationToken
)

Parameters

iSel  ISelectTEntity
ISelect 对象。
filter  TFilter
过滤器。
cancellationToken  CancellationToken
用于取消操作的令牌。

Return Value

Taskbool
truefalse,指示类别过滤条件是否有效。

Remarks

CategoryFilterPropertyName 不为空且 filterCategoryId 具有有效值时,将设置一个等于 where 条件。
此方法返回 false 将导致查询结果为一个空列表。
基类此方法始终返回 true

See Also