internal CompositeCriteria(Criteria left, LogicType logic, Criteria right) { left.ThrowIfNullArgument(nameof(left)); right.ThrowIfNullArgument(nameof(right)); logic.ThrowIfEnumOutOfRange(); _left = left; _right = right; _logic = logic; }
public virtual StringBuilder BuildWhereFilters(Criteria criteria, IEnumerable<SingleEntityView> svList) { criteria.ThrowIfNullArgument(nameof(criteria)); svList.ThrowIfNullArgument(nameof(svList)); _svList = svList; _str = new StringBuilder(); Visit(criteria); _str.UnBracketing(StringPair.Parenthesis); return _str; }
protected void Visit(Criteria criteria) { switch (criteria.CriteriaType) { case CriteriaType.Single: Visit((SingleExpressionCriteria)criteria); break; case CriteriaType.Composite: Visit((CompositeCriteria)criteria); break; } }
public Query(View view, Criteria criteria) { _view = view; //Note:criteria can be null, view.OrderBy(..) or view.AsQuery() _criteria = criteria; }