I'm trying to use dynamic linux queries for my file filtering. In fact, I have the User Experiment and Order BAE Express String defined in an XML document which I read and then applied for a list of files which have been made available for various instructions. I got a library at and decided to use it, but I think some problems are starting. I have so far, when I try to pass expressions and orderbars in the IQueryable list e.ge
** WhereQuery ** = "@ SubType = 02" ** OrderByQuery ** = "Form ID" var sort Did repose = repos Where (Dear, where the operation). Order buy (rare order beer expedition); I get the following error message I
System.Linq.Dynamic.ParseException was caught message = operator '=' operand type 'string' and 'Int32' inconsistent = dynamic situation with source = 12 StackTrace: .ExpressionParser.CheckAndPromoteOperands (type sign System.Linq.Dynamic, string opName, left expression & amp;, the expression & amp; well, Int32 errorPos ) System.Linq.Dynamic.DynamicExpression.ParseLambda (ParameterExpression [on System.Linq on System.Linq.Dynamic.ExpressionParser.ParseComparison () on System.Linq.Dynamic.ExpressionParser.ParseLogicalAnd ()] Sys parameters Do tem.Linq.Dynamic.ExpressionParser.ParseExpression on System.Linq.Dynamic.ExpressionParser.Parse .Dynamic.ExpressionParser.ParseLogicalOr () to () (type Result type) Type Result type String expression, Object [] values) < Now when I use Comparison Operator,
** WhereQuery = "@ SubType == 02" orderbiezer = "form ID" ** < / Code> I also get the following error
System.Linq.Dynamic ParseException message = operator '==' was captured with incompatible type 'string' incompatible And 'int32' Source = dynamic position = 12 StackTrace: System.Linq.Dynamic.ExpressionParser.CheckAndPromoteOperands (type signature, string opName, expression & amp; Left, expression & amp; Well, System.Linq.Dynamic.ExpressionParser.ParseComparison on Int32 errorPos) () on System.Linq.Dynamic.ExpressionParser.ParseLogicalAnd () (on System.Linq.Dynamic.ExpressionParser.ParseLogicalOr) on System.Linq.Dynamic.ExpressionParser . ParseExpression () on System.Linq.Dynamic on System.Linq.Dynamic.ExpressionParser.Parse (type resultType) on System.Linq.Dynamic.DynamicExpression.ParseLambda (ParameterExpression [] parameters, type resultType, string expression, [] values object) .DynamicExpression.ParseLambda (, IQueryable source, string predicate [] values object [) (type itType, type resultType, string expressions, object] value) on System.Linq.Dynamic.DynamicQueryable on System.Linq.Dynamic.DynamicQueryable.Where. Where [T] (IQueryable 1 source, string word, object [] value) How can I properly specify my expression so that my list can be filtered? Thanks in advance
You use instead of == Will = . The latter is used for comparison, the latter for the assignment.
No comments:
Post a Comment