This document details the steps required to provide Microsoft Entity Framework access to Informix Schema Objects using the
The following prerequisites must be in place for this solution to be possible.
An Informix DBMS hosting the required Schema Objects needs to be available. In this document the Informix stores_demo sample database will be used to demonstrate the process.
An Informix ODBC Driver is required for Linking the Informix Schema Objects into the Virtuoso Server.
The inf10ma
will be assumed to exist on the machine hosting the Virtuoso Server.
An Virtuoso installation including the Virtuoso Universal Server and ADO.NET Entity Framework Provider is required. The Virtuoso components used must be Release 5.10.x or above, this being the minimum version containing support for Microsoft Entity Frameworks.
At minimum, Microsoft Visual Studio 2008 Service Pack 1 is required. Later versions of Visual Studio may require some extra steps, e.g., VS2010.
The Visual Studio 2008 Entity Data Model (EDM) requires that all primary keys are NOT Nullable, and will fail to generate an EDM if any are. Thus ensure any tables to be used are defined as not nullable in the Informix database schema before attempting to generate an EDM. In the case of the Informix stores_demo database many tables have primary keys that are are nullable, so these will need to be redeclared.
This is possible using dbaccess. However, care needs to be taken, particularly with the following -
In both of the cases above, the primary key and foreign key constraints that are removed will have to be manually recreated.
The Virtuoso Virtual Database engine uses ODBC as the connectivity mechanism for linking remote database objects into its local schema.
Thus, an Informix ODBC Driver must be available with a suitably configured DSN for connecting to the target database.
The
Installation instructions for the
Now that a Microsoft Entity Data Model has been created for the Informix stores_demo database, Entity Framework applications can be created to make use of it.