<docbook><section><title>VirtINFEDM</title><bridgehead class="http://www.w3.org/1999/xhtml:h3">Creating an Entity Data Model (EDM) for the Informix stores_demo database</bridgehead>
<para>The following steps can be used to create an Entity Data Model (EDM) for the Informix stores_demo database:</para><para> 1.
 Launch the Visual Studio 2008 SP1 IDE.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_01.png" /></figure></para><para>2.
 Create a <emphasis>Web Application</emphasis> project by going to the <emphasis>File</emphasis> menu in Visual Studio and choosing <emphasis>New Project</emphasis>.
  <figure><graphic fileref="VirtINFEDM/VirtInformixEDM_02.png" /></figure></para><para>3.
 When the New Project window appears, choose either <emphasis>Visual Basic</emphasis> or <emphasis>Visual C#</emphasis> as your programming language.</para><para>4.
 Within the language category, click on <emphasis>Web</emphasis> and select <emphasis>ASP.NET Web Application</emphasis> from the right-hand panel.
 </para><para>5.
 Choose a name for the project, for example <emphasis>WebDataService</emphasis>, and click <emphasis>OK</emphasis>.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_03.png" /></figure></para><para>6.
 This will create a new project called <emphasis>stores_demo</emphasis>.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_04.png" /></figure></para><para>7.
 Select the <emphasis>Project</emphasis> -&gt; <emphasis>Add New Item</emphasis> menu option.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_05.png" /></figure></para><para>8.
 The <emphasis>Add New Item</emphasis> dialog will appear.
 Choose the <emphasis>ADO.NET Entity Data Model</emphasis> template.
 Give it the name <emphasis>Model1.edmx</emphasis> and click <emphasis>Add</emphasis> to start the creation of the ADO.Net Entity Data Model.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_06.png" /></figure></para><para>9.
 In the <emphasis>Entity Data Model Wizard</emphasis> dialog <emphasis>Choose Model Contents</emphasis> page, select the <emphasis>Generate from Database</emphasis> model type and click <emphasis>Next</emphasis>.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_07.png" /></figure></para><para>10.
 In the <emphasis>Entity Data Model Wizard</emphasis> dialog <emphasis>Choose your Data Connection</emphasis> page, select the <emphasis>New Connection</emphasis> button.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_08.png" /></figure></para><para>11.
 In the <emphasis>Choose Data Source</emphasis> dialog, select the <emphasis>OpenLink Virtuoso Data Source</emphasis> from the list and click <emphasis>Continue</emphasis>.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_09.png" /></figure></para><para>12.
 In the <emphasis>Connection Properties</emphasis> dialog, specify the <emphasis>hostname</emphasis>, <emphasis>portno</emphasis>, <emphasis>username</emphasis>, and password for the target Virtuoso Server and check the <emphasis>Save Password</emphasis> check box.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_10.png" /></figure></para><para>13.
 Select the <emphasis>Select Database From List</emphasis> radio button and choose <emphasis>stores_demo</emphasis> from the drop down list.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_11.png" /></figure></para><para>14.
 Press the <emphasis>Test Connection</emphasis> dialog to verify that the database is accessible.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_12.png" /></figure></para><para>15.
 Set the <emphasis>entity connect string</emphasis> name to <emphasis>stores_demoEntities</emphasis> (note this name as it is required in the section on creating and ADO.Net Data Service) and click <emphasis>Next</emphasis>.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_13.png" /></figure></para><para>16.
 In the <emphasis>Choose your Database Objects</emphasis> page, tick the <emphasis>Tables</emphasis> check box to select all tables in the stores_demo catalog for addition to the Entity Data Model.
 Set the <emphasis>Model Namespace</emphasis> to <emphasis>stores_demoModel</emphasis> and click <emphasis>Finish</emphasis>.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_14.png" /></figure></para><para>17.
 The <emphasis>Model1.edmx</emphasis> EDM will be created with the tables and relationships displayed in the Visual Studio IDE.
<figure><graphic fileref="VirtINFEDM/VirtInformixEDM_15.png" /></figure></para><para>Creation for the Entity Data Model for the Informix stores_demo database is now complete.
</para></section></docbook>