Abstract

This section details the steps required to provide Microsoft Entity Framework access to ODBC to ODBC Bridge Schema Objects using the OpenLink Virtuoso Universal Server. This is achieved by linking the required ODBC to ODBC Bridge Schema objects into Virtuoso using its built in Virtual Database engine, and then using the Virtuoso ADO.NET Entity Framework provider to query the remote ODBC to ODBC Bridge Schema objects linked into the Virtuoso Server.

Prerequisites.  The following prerequisites must be in place for this solution to be possible.

ODBC to ODBC Bridge DBMS.  An ODBC to ODBC Bridge DBMS hosting the required Schema Objects needs to be available. In this section we shall make and ODBC to ODBC bridge connection to another Virtuoso Northwind Demo database to demonstrate the process.

An ODBC to ODBC Bridge DBMS hosting the required Schema Objects needs to be available. In this section we shall make and ODBC to ODBC bridge connection to another Virtuoso Northwind Demo database to demonstrate the process.

ODBC to ODBC Bridge Driver.  An ODBC to ODBC Bridge Driver is required for Linking the ODBC to ODBC Bridge Schema Objects into the Virtuoso Server. The OpenLink ODBC to ODBC Bridge Driver will be used in this section, for which a functional ODBC Data source name of "odbcma" will be assumed to exist on the machine hosting the Virtuoso Server.

An ODBC to ODBC Bridge Driver is required for Linking the ODBC to ODBC Bridge Schema Objects into the Virtuoso Server. The OpenLink ODBC to ODBC Bridge Driver will be used in this section, for which a functional ODBC Data source name of "odbcma" will be assumed to exist on the machine hosting the Virtuoso Server.

Virtuoso Universal 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

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

Microsoft Visual Studio 2008 SP1.  Microsoft Visual Studio 2008 Service Pack 1 is required, this being the only version containing the necessary Entity Framework support available at the time of writing.

Microsoft Visual Studio 2008 Service Pack 1 is required, this being the only version containing the necessary Entity Framework support available at the time of writing.

Tasks

Ensure ODBC to ODBC Bridge Primary Keys (PKs) are not nullable.  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 ODBC to ODBC Bridge database schema before attempting to generate an EDM. In the case of the ODBC to ODBC Bridge Virtuoso Northwind Demo database all tables are not nullable, thus this should not be an issue in this case.

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 ODBC to ODBC Bridge database schema before attempting to generate an EDM. In the case of the ODBC to ODBC Bridge Virtuoso Northwind Demo database all tables are not nullable, thus this should not be an issue in this case.