Data Access has been discontinued. Please refer to this page for more information.

Creating Domain Model

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

In this step you will create a Telerik Data Access Class Library project which will hold the Domain Model of the Sofia Car Rental database.

  1. Open Visual Studio and from the FILE menu, select New and then Project...
  2. From the New Project dialog, from within the Windows project templates, select Telerik Data Access Class Library template. In the Solution name field type QuickstartWPF or QuickstartWPF_VB for VB and name your project SofiaCarRental.Model. Click the OK button.
  3. The New Domain Model Wizard will appear displaying the Select Telerik Data Access Domain Model Type screen. Select the Populate from database option. In the Model Name field enter SofiaCarRentalContext. Click the Next button.
  4. You will be taken to the Setup Database Connection dialog. Use the Add New Connection button to configure the connection to your database. In the Connection String Name text-box type SofiaCarRentalConnection. Press the Next button.
  5. Next is the Choose Database Items screen. Here you need to select the tables which will compose your model. Expand the Tables node and click on the checbox in front of it to select all tables from the database. Click the Finish button to complete the wizard.

Completing the New Domain Model Wizard will do the following:

  • Add references to Telerik Data Access assemblies.
  • Generates an .rlinq file which encapsulates the model of the database. The default name of the .rlinq file is in as Telerik Data Access Class Library project is EntitiesModel.rlinq.
  • Creates an app.config file containing the defined connection string.
  • Displays the Domain Model in the Telerik Data Access Visual Designer.

To finalize this step of the Quick Start,select the generated EntitiesModel.rlinq file and rename it to SofiaCarRentalModel.rlinq. Expanding the .rlinq file should now look like the picture below:

Next step: Creating the WPF Project