<docbook><section><title>VirtFirebirdEDM</title><bridgehead class="http://www.w3.org/1999/xhtml:h3">Creating an Entity Data Model (EDM) for the Firebird employee database</bridgehead>
<para>The following steps can be used to create an Entity Data Model (EDM) for the Firebird employee database:</para>
<orderedlist spacing="compact"><listitem>Launch the Visual Studio 2008 SP1 IDE.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_01.png" /></figure> </listitem>
<listitem>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="VirtFirebirdEDM/VirtFirebirdEDM_02.png" /></figure> </listitem>
<listitem>When the New Project window appears, choose either <emphasis>Visual Basic</emphasis> or <emphasis>Visual C#</emphasis> as the programming language. </listitem>
<listitem>Within the language category click on <emphasis>Web</emphasis>, and select <emphasis>ASP.NET Web Application</emphasis> from the right-hand panel.
  </listitem>
<listitem>Choose a name for the project, for example <emphasis>employee, and click <emphasis>OK</emphasis>.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_03.png" /></figure> </emphasis></listitem>
<listitem>This will create a new project called <emphasis>employee.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_04.png" /></figure> </emphasis></listitem>
<listitem>Select the <emphasis>Project</emphasis> -&gt; <emphasis>Add New Item</emphasis> menu option.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_05.png" /></figure> </listitem>
<listitem>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="VirtFirebirdEDM/VirtFirebirdEDM_06.png" /></figure> </listitem>
<listitem>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="VirtFirebirdEDM/VirtFirebirdEDM_07.png" /></figure> </listitem>
<listitem>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="VirtFirebirdEDM/VirtFirebirdEDM_08.png" /></figure> </listitem>
<listitem>In the <emphasis>Choose Data Source</emphasis> dialog, select the <emphasis>OpenLink Virtuoso Data Source</emphasis> from the list displayed and click <emphasis>Continue</emphasis>.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_09.png" /></figure> </listitem>
<listitem>In the <emphasis>Connection Properties</emphasis> dialog specify the <emphasis>hostname</emphasis>, <emphasis>portno</emphasis>, <emphasis>username</emphasis> and <emphasis>password</emphasis> for the target Virtuoso Server and check the <emphasis>Save Password</emphasis> check box.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_10.png" /></figure> </listitem>
<listitem>Select the <emphasis>Select Database From List</emphasis> radio button and choose <emphasis>employee</emphasis> from the drop down list <figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_11.png" /></figure> </listitem>
<listitem>Press the <emphasis>Test Connection</emphasis> dialog to verify the database is accessible.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_12.png" /></figure> </listitem>
<listitem>Set the <emphasis>entity connect string</emphasis> name to <emphasis>employeeEntities</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="VirtFirebirdEDM/VirtFirebirdEDM_13.png" /></figure> </listitem>
<listitem>In the <emphasis>Choose your Database Objects</emphasis> page select the <emphasis>Tables</emphasis> check box to select all tables in the employee catalog for addition to the Enity Data Model, set the <emphasis>Model Namespace</emphasis> to <emphasis>employeeModel</emphasis> and click <emphasis>Finish</emphasis>.
<figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_14.png" /></figure> </listitem>
<listitem>The <emphasis>Model1.edmx</emphasis> EDM will be created with the tables and relationships displayed in the Visual Studio IDE <figure><graphic fileref="VirtFirebirdEDM/VirtFirebirdEDM_15.png" /></figure></listitem>
</orderedlist><para>Creation for the Enity Data Model for the Firebird employee database is now complete.
</para>
</section></docbook>