Unable to cast object of type 'LogicalBinaryExpression' to type 'System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]]'.'

1

TestData is System.Linq.Expressions.LogicalBinaryExpression

I have convert to Expression<Func<Experience, bool>> this format its occur error

Expression<Func<Experience, bool>> C1 = (Expression<Func<Experience, bool>>)TestData;

Error:

System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Linq.Expressions.LogicalBinaryExpression' to type 'System.Linq.Expressions.Expression1[System.Func2[CCIP.Shared.ModelsCCIP.Experience,System.Boolean]]'. Source=CCIP.Data StackTrace:

c#
database
linq
asked on Stack Overflow Aug 17, 2020 by M K • edited Aug 17, 2020 by Guru Stron

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0