private Expression VisitWhere(MethodCallExpression methodCall) { Expression expression = ExpressionEvaluator.Evaluate(methodCall); var eval = new WhereEvaluator(this._tableFinder, Table); _ = eval.Evaluate(expression); if (eval.Fallback || eval.Table == null || (Table != null && eval.Table != Table)) { this._fallback = true; return(methodCall); } if (Table == null) { Table = eval.Table; } this._arguments.AddRange(eval.Arguments); if (this._queryBuilder.Length > 0) { this._queryBuilder.Append(" AND "); } this._queryBuilder.Append(eval.QueryString); return(methodCall.Arguments[0]); }
private Expression VisitWhere(MethodCallExpression methodCall) { Expression expression = ExpressionEvaluator.Evaluate(methodCall); var eval = new WhereEvaluator(this.tableFinder, Table); expression = eval.Evaluate(expression); TableFindResult result = eval.Result; if (Table == null) { Table = result.Table; } if (eval.Fallback || result.Table == null || result.Table != Table) { this.fallback = true; return(methodCall); } this.arguments.AddRange(result.Arguments); if (this.queryBuilder.Length > 0) { this.queryBuilder.Append(" AND "); } this.queryBuilder.Append(result.QueryString); return(methodCall.Arguments[0]); }
private Expression VisitWhere( MethodCallExpression methodCall ) { Expression expression = ExpressionEvaluator.Evaluate( methodCall ); var eval = new WhereEvaluator( tableFinder, Table ); expression = eval.Evaluate( expression ); if(eval.Fallback || eval.Table == null || (Table != null && eval.Table != Table)) { fallback = true; return methodCall; } if(Table == null) { Table = eval.Table; } arguments.AddRange( eval.Arguments ); if(queryBuilder.Length > 0) { queryBuilder.Append( " AND " ); } queryBuilder.Append( eval.QueryString ); return methodCall.Arguments[0]; }
private Expression VisitWhere (MethodCallExpression methodCall) { Expression expression = Street.MvxPlugins.Contacts.Utils.ExpressionEvaluator.Evaluate (methodCall); var eval = new WhereEvaluator (this.tableFinder, Table); expression = eval.Evaluate (expression); TableFindResult result = eval.Result; if (Table == null) Table = result.Table; if (eval.Fallback || result.Table == null || result.Table != Table) { this.fallback = true; return methodCall; } this.arguments.AddRange (result.Arguments); if (this.queryBuilder.Length > 0) this.queryBuilder.Append (" AND "); this.queryBuilder.Append (result.QueryString); return methodCall.Arguments[0]; }