public static LogicExpression AnyEqVarParam(this IEnumerable <IColumnExpression> cols) { IFilterExpression filter = null; LogicExpression logic = null; foreach (var col in cols) { if (filter == null) { filter = col.EqVarParam(); } else { logic = filter.Or(col.EqVarParam()); filter = logic; } //filter = filter == null ? col.EqVarParam() as IFilterExpression : filter.Or(col.EqVarParam()); } return(logic); }
public static LogicExpression AnyEq(this IEnumerable <IColumnExpression> cols, IEnumerable <IValueExpression> values) { IFilterExpression filter = null; LogicExpression logic = null; var em = values.GetEnumerator(); foreach (var col in cols) { em.MoveNext(); if (filter == null) { filter = col.Eq(em.Current); } else { logic = filter.Or(col.Eq(em.Current)); filter = logic; } //filter = filter == null ? col.Eq(em.Current) as IFilterExpression : filter.Or(col.Eq(em.Current)); } return(logic); }
public IRecordWhere Or(IFilterExpression <string, object> expression) { filter = filter.Or(expression); return(this); }