public Criteria Or(string parameter, Clause clause, object value) { var criteriaItem = new CriteriaItem(LogicalOperator.Or, parameter, clause, value); _criteriaList.Add(criteriaItem); return(this); }
public Criteria(string parameter, Clause clause, object value) : this() { var criteriaItem = new CriteriaItem(LogicalOperator.None, parameter, clause, value); _criteriaList.Add(criteriaItem); }
public void Process(CriteriaItem criteriaItem, int nestingLevel, int index) { AppendLogicaloperator(criteriaItem.LogicalOperator); expression.Append(GetColumnName(criteriaItem)); expression.Append(_SPACE); expression.Append(strClauses[criteriaItem.Clause]); switch (criteriaItem.Clause) { case Clause.IsNotNull: break; case Clause.IsNull: break; default: expression.Append(_SPACE); expression.Append(GetValue(criteriaItem, nestingLevel, index)); break; } }
protected virtual string GetValue(CriteriaItem criteriaItem, int nestingLevel, int index) { return(valueToStringConverter.Convert(criteriaItem.Value)); }
protected virtual string GetColumnName(CriteriaItem criteriaItem) { return(criteriaItem.Parameter); }