Search Wiki:
This is a Sample Entity Framework Provider for Oracle. It works with Oracle 10g by wrapping System.Data.OracleClient APIs. It uses the same technique as Entity Framework Sample Provider which wraps System.Data.SqlClient.

Sample Entity Framework Provider for Oracle is compatible with Entity Framework released as part of .NET Framework 3.5 SP1.

DISCLAIMER

This is an unsupported sample and should be treated as such. Although reasonable effort has been put to make sure that basic EF scenarios work with Oracle, there are certain limitations. Use in production environment is strongly discouraged.

INSTALLATION

  1. Install Visual Studio 2008 SP1.
  2. Install Oracle 10g Express Edition from http://www.oracle.com/technology/software/products/database/xe/index.html
  3. Add new user "edmuser" with password "123456" (if you change the user name/password you will need to update connection strings). The user needs to have permissions to create database objects (assigning the user to DBA role is the quickest way to give necessary permissions).
  4. The default connection string is using XE name from tnsnames.ora. If you have installed a different version of Oracle or used different instance configuration, you will have to update connection strings in App.config files.
  5. Review "OracleNorthwind/install_db.cmd" and adjust path to sqlplus.exe as necessary then run the batch file. It will create and populate a Northwind sample database in "edmuser" schema.
  6. Open the solution file EFOracleProvider.sln and run "EFOracleProvider.AdHocTests" and "Entity Framework Query Samples"

KNOWN ISSUES

  1. BINARY_FLOAT/BINARY_DOUBLE types are not supported. This is a limitation of underlying System.Data.OracleClient. Columns using those types have been replaced with NUMBER.
  2. Oracle DDEX Provider for Visual Studio is not included. Example DDEX provider that supports SQL Server is available as part of EF Sample Provider at http://code.msdn.microsoft.com/EFSampleProvider
  3. APPLY operator is not supported by Oracle. As a result, certain queries that internally use this operator (such as "Average - Grouping 1", "Max - Grouping", "Min - Grouping") are not supported.
  4. Certain functions (AVG in particular) return numeric values that cannot be properly materialized as decimal by System.Data.OracleClient. As a result users will get OCI-22053 (overflow).
Last edited Aug 13 at 1:55 AM  by jkowalski, version 9
Comments
Hollywood wrote  Jul 4 at 10:16 AM  
I work on a project which works on two databases : SQL Server and Oracle.
Could I create two EDMX files, one for SQL Server (using Microsoft provider), the other for Oracle (using this provider) ?
The choice of the database could be a parameter on my web.config file...?

Thx

pisoias wrote  Aug 13 at 11:35 AM  
Hello, I've migrated an edmx to use this Oracle provider (and also migrated the MSSQL database to Oracle 10g). Now I'm getting the following:

Schema specified is not valid. Errors:
EFOracleProvider.Resources.EFOracleStoreSchemaMapping.msl(3,4) : error 2002: The EntityContainer 'SchemaInformation' for the conceptual model specified as part of this MSL does not exist in MetadataWorkspace.

I don't know what that means, please help !
Thanks

Updating...
Page view tracker