1

I'm using .NET Entity Framework with Oracle.

There are two main providers for Oracle database: one is the official release from Oracle ("ODP" - Oracle Database Provider) and another is the "Devart dotConnect for Oracle".

In the documentation of both providers it's written that they support Oracle 12c, 11g, 10g...

But if I use any of them with Oracle 11g, I see that they both generate commands supported only by Oracle 12c and newer. Example: OUTER APPLY.

Is there any kind of configuration for saying to the provider that I want it to use SQL commands according to the version of DBMS they are connected?

Provider shouldn't do it automatically?

1 Answers1

1

The APPLY keyword generation is not really done by the Oracle EF Driver, it is done by Entity Framework itself. As I understand it, the parse tree they give the provider pretty much forces it to use APPLY. And if it doesn't exist with the database you are using, then you get an error. This is not an Oracle specific situation. Older versions of SQL Server and other database vendors also do not have this keyword.

Oracle reacted to this situation by adding the keyword to Oracle 12c. That's right, APPLY was added specifically for EF. You can Google around and find some articles on the internet that suggest how to write EF code that minimizes the generation of APPLY.

Christian Shay
  • 2,570
  • 14
  • 24