Home

Linq Predicatebuilder Error Oracle

I am connected to Oracle via IQ(Supports Oracle, MySQL, SQLite) 2.0.7.0. I have a connection to a table and have the following code in linqpad I also have include predicate builder checked.

Here is my code
void Main()
{
var predicate = PredicateBuilder.False();
predicate = predicate.Or (c=> c.ClaimType.Trim() == "M");
predicate = predicate.Or (c=> c.ClaimType.Trim()=="D");
Claims.Where (predicate).Dump();

}

I have table with the same name in MS SQL Server and it works correctly
In Oracle I am getting a error on the last line when I run the code System.InvalidOperator

at System.Linq.Expressions.ExpressionCompiler.GenerateParameterAccess(ILGenerator gen, ParameterExpression p, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateMemberAccess(ILGenerator gen, Expression expression, MemberInfo member, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateConvert(ILGenerator gen, UnaryExpression u)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateNewArray(ILGenerator gen, NewArrayExpression nex)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateArgs(ILGenerator gen, ParameterInfo[] pis, ReadOnlyCollection`1 args)
at System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodInfo mi, ReadOnlyCollection`1 args, Type objectType)
at System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodCallExpression mc, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateArgs(ILGenerator gen, ParameterInfo[] pis, ReadOnlyCollection`1 args)
at System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodInfo mi, ReadOnlyCollection`1 args, Type objectType)
at System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodCallExpression mc, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateNewArray(ILGenerator gen, NewArrayExpression nex)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateArgs(ILGenerator gen, ParameterInfo[] pis, ReadOnlyCollection`1 args)
at System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodInfo mi, ReadOnlyCollection`1 args, Type objectType)
at System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodCallExpression mc, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateConvert(ILGenerator gen, UnaryExpression u)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateInvoke(ILGenerator gen, InvocationExpression invoke, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateConvert(ILGenerator gen, UnaryExpression u)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateLambda(LambdaExpression lambda)
at System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda(LambdaExpression lambda)
at System.Linq.Expressions.LambdaExpression.Compile()
at System.Linq.Expressions.Expression`1.Compile()
at IQToolkit.Data.EntityProvider.Execute(Expression expression)
at IQToolkit.Data.EntitySession.SessionProvider.Execute(Expression expression)
at IQToolkit.Query`1.System.Collections.IEnumerable.GetEnumerator()
at LINQPad.ObjectGraph.ListNode..ctor(ObjectNode parent, IEnumerable list, Int32 maxDepth, DataContextDriver dcDriver, String name)
at LINQPad.ObjectGraph.ListNode..ctor(ObjectNode parent, IEnumerable list, Int32 maxDepth, DataContextDriver dcDriver)
at LINQPad.ObjectGraph.ObjectNode.Create(ObjectNode parent, Object item, Int32 maxDepth, DataContextDriver dcDriver)

Comments

Sign In or Register to comment.