Entity Framework Limitations The Oracle Entity Framework data provider supports .NET Framework 4.0 or higher and ADO.NET Entity Framework 4.1 and 4.2 features such as Code First and Model First. The DB2 and Sybase Entity Framework data providers can be used with applications that target the .NET Framework 4.0 or higher. However, they currently do not support most of the functionality introduced in .NET Framework 4.0 or higher and Entity Framework 4.1 and 4.2. For the most current information on functionality supported, refer to the product matrix on the Progress DataDirect Web site: http://www.datadirect.com/products/net/matrix/dotnetmatrix.htm Entity Framework Version Compatibility Issues The Oracle Entity Framework data provider references the EntityFramework.dll version 4.2. If your application references a different version of the EntityFramework.dll, then you might encounter some build or runtime errors. The error results when both of the following are true: ■ Your application has an explicit reference to the Oracle Entity Framework data provider. ■ Your application references an earlier revision of the EntityFramework.dll (for example, Entity Framework 4.1) or an EntityFramework.dll revision subsequent to 4.2. The following code snippet demonstrates the only scenario in which your application would need to specify an explicit reference to the Oracle Entity Framework data provider: Database.DefaultConnectionFactory = new DDTek.Oracle.Entity.OracleConnectionFactory(); In the following example, an error occurs because the application refers to a different EntityFramework.dll from the version used by the Oracle Entity Framework data provider: Assembly 'DDTek.Oracle.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=c84cd5c63851e072' uses 'EntityFramework, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' which has a higher version than referenced assembly 'EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' In the following example, an error occurs because the application refers to an EntityFramework.dll revision that is subsequent to the 4.2 revision used by the Oracle Entity Framework data provider: Could not load file or assembly 'EntityFramework, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. To avoid these error scenarios, your application can create the model using a named connection string to set the Database.DefaultConnectionFactory: app.config entry <configuration> <connectionStrings> <add name="EF_Oracle_10g_UTF8" connectionString="host=server1;port=1522;user id=test;password=xxx;sid=NorthwindEFUTF8" providerName="DDTek.Oracle" /> </connectionStrings> </configuration> Create the context as follows: model2 ctx = new model2("EF_Oracle_10g_UTF8"); Model First Issues The DB2 and Sybase Entity Framework data providers currently do not support Model First. They do not appear in the drop-down list for the DDL Generation Template property in the ConceptualEntityModel Properties window, as shown in the following figure. Code First Issues The following tables list the errors that the DB2 and Sybase Entity Framework data providers return when running any Code First application that specifies a DB2 or Sybase database in the connection string. Table 3-1. Error Messages for the DB2 Data Provider Problem Error Message Tried to use Code First SQL0204N: dbo.EdmMetadata is an undefined name. Tried to use Entity Framework 4.0 Canonical Functions SQL0440N: No FUNCTION by the name ADDDAYS having compatible arguments was found. Table 3-2. Error Messages for the Sybase Entity Framework Data Provider Problem Error Message Tried to use Code First dbo.EdmMetadata not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce a lot of output). Tried to use Entity Framework 4.0 Canonical Functions Function 'AddDays' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a lot of output).