public static LogicExpression AllEqVarParam(this IEnumerable <IColumnExpression> cols) { IFilterExpression filter = null; LogicExpression logic = null; foreach (var col in cols) { if (filter == null) { filter = col.EqVarParam(); } else { logic = filter.And(col.EqVarParam()); filter = logic; } //filter = filter == null ? col.EqVarParam() as IFilterExpression : filter.And(col.EqVarParam()); } return(logic); }
public static LogicExpression AllEq(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.And(col.Eq(em.Current)); filter = logic; } //filter = filter == null ? col.Eq(em.Current) as IFilterExpression : filter.And(col.Eq(em.Current)); } return(logic); }
public IRecordWhere And(IFilterExpression <string, object> expression) { filter = filter.And(expression); return(this); }