public IQuery <T> AddWhere(string strWhere) { Utils.CheckNull(strWhere); AddWhereExpression e = new AddWhereExpression(typeof(T), _expression, strWhere); return(new Query <T>(this._dbContext, e, this._trackEntity)); }
public override IQueryState Visit(AddWhereExpression exp) { IQueryState prevState = exp.PrevExpression.Accept(this); IQueryState state = prevState.Accept(exp); return(state); }
public virtual IQueryState Accept(AddWhereExpression exp) { //var con = (ConstantExpression)exp.Predicate.Body; //if (con.Value.GetType().Equals(typeof(String))) //{ // //FilterPredicateExpressionVisitor.ParseFilterPredicate(exp.Predicate, this.MoeList); // DbExpression addWhereCondition = new DbAddWhereExpression(con.Value.ToString()); // this._resultElement.AppendCondition(addWhereCondition); //} string strWhere = exp.StrWhere; DbExpression addWhereCondition = new DbAddWhereExpression(strWhere); this._resultElement.AppendCondition(addWhereCondition); return(this); }