0

Here is the c# query:

qry = qry.Where(comment => idsArr.Any(
                           selectedId => dbv.VW_STAKEHOLDER_TYPE_XREF.Where(xref => xref.STAKE_ID == comment.STAKE_ID && xref.STAKEHOLDER_TYPE_ID == selectedId).FirstOrDefault() != null
                            ));

From the language of the exception I am guessing that something in the c# is being translated to an apply which Oracle 11 doesn't like for some reason. I am not sure which part of the query is getting translated into APPLY and how I can circumvent this issue.

Thanks in advance.

T.S.
  • 18,195
  • 11
  • 58
  • 78
pQuestions123
  • 4,471
  • 6
  • 28
  • 59

1 Answers1

1

LINQ to SQL only really works with SQL Server, although some simple queries may work on other databases. In this case the query failed as Oracle does not have a CROSS APPLY clause, but uses lateral joins instead. See this post for options when you want to use LINQ with Oracle: Is there a Way to use Linq to Oracle

Community
  • 1
  • 1
Alex
  • 21,273
  • 10
  • 61
  • 73