The following steps can be used to create an Entity Data Model (EDM) for the Microsoft Access Northwind database:

  1. Launch the Visual Studio 2008 SP1 IDE.

    Figure 8.558. Visual Studio 2008 SP1 IDE

    Visual Studio 2008 SP1 IDE

  2. Create a

    Web Application

    project by going to the

    File

    menu in Visual Studio and choosing

    New Project

    .

    Figure 8.559. Web Application

    Web Application

  3. When the New Project window appears, choose either

    Visual Basic

    or

    Visual C#

    as your programming language.

  4. Within the language category, click on

    Web

    and select

    ASP.NET Web Application

    from the right-hand panel.

  5. Choose a name for the project, for example

    VirtuosoDataService

    , and click

    OK

    .

    Figure 8.560. name for the project

    name for the project

  6. This will create a new project called

    VirtuosoDataService

    .

    Figure 8.561. create a new project

    create a new project

  7. Select the Project -> Add New Item menu option.

    Figure 8.562. VirtuosoDataService

    VirtuosoDataService

  8. The

    Add New Item

    dialog will appear. Choose the

    ADO.NET Entity Data Model

    template. Give it the name

    Virtuoso.edmx

    and click

    Add

    to start the creation of the ADO.Net Entity Data Model.

    Figure 8.563. Add New Item

    Add New Item

  9. In the

    Entity Data Model Wizard

    dialog

    Choose Model Contents

    page select the

    Generate from Database

    model type and click

    Next

    .

    Figure 8.564. Choose Model Contents

    Choose Model Contents

  10. In the

    Entity Data Model Wizard

    dialog

    Choose your Data Connection

    page, select the

    New Connection button

    Figure 8.565. Entity Data Model Wizard

    Entity Data Model Wizard

  11. In the

    Choose Data Source

    dialog, select the OpenLink

    Virtuoso Data Source

    from the list and click

    Continue

    .

    Figure 8.566. Choose Data Source

    Choose Data Source

  12. In the

    Add Connection

    dialog, specify the

    hostname, portno, username and password

    for the target Virtuoso Server and check the Save Password check box.

    Figure 8.567. Connection Properties

    Connection Properties

  13. Select the

    Select Database From List

    radio button and choose the

    NWIND

    database from the drop down list.

    Figure 8.568. Add connection

    Add connection

  14. Press the

    Test Connection

    dialog to verify that the database is accessible.

    Figure 8.569. Test Connection

    Test Connection

  15. Set the

    entity connect string

    name to

    VirtuosoEntities

    (note this name as it is required in the section on creating and ADO.Net Data Service) and click

    Next

    .

    Figure 8.570. entity connect string

    entity connect string

  16. In the

    Choose your Database Objects

    page select the

    Tables

    check box to select all tables in the NWIND catalog for addition to the Entity Data Model. Set the

    Model Namespace

    to

    VirtuosoModel

    and click

    Finish

    .

    Figure 8.571. Database Objects

    Database Objects

  17. The

    Virtuoso.edmx

    EDM will be created with the tables and relationships displayed in the Visual Studio IDE

    Figure 8.572. Virtuoso.edmx

    Virtuoso.edmx

Creation for the Entity Data Model for the Microsoft Access Northwind database is now complete.