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 task, you will create the SofiaCarRental domain model in the web project, by using the Telerik Data Access Model Tools.

To Create the SofiaCarRental Domain Model:

  1. Right-click on the SilverlightOpenAccessIntegration.Web project, point Add, and then New Item.
  2. In the list of categories, select Data and then select the Telerik Data Access Domain Model item.
  3. Enter the name for the model (SofiaCarRentalDomainModel.rlinq), and then click Add.
  4. The Select Domain Model Type Dialog appears. Choose Populate from database. This option will let you create a domain model based on an existing database schema (schema first). Enter SofiaCarRentalDbContext for model name. Click Next to proceed.

  5. The Setup Database Connection Dialog of the Telerik Data Access Create Model Wizard appears. In the Setup Database Connection Dialog, the database connection properties should be specified.

  6. Specify a connection string to the SofiaCarRental database. Type a name for the connection or use the provided default one. Press Next to continue.
  7. The Choose Database Items Dialog appears. By default, no objects in the database are selected for inclusion in the domain model. Check all tables and click Finish to generate the domain model.

The Telerik Data Access Create Model Wizard does the following:

  • Adds references to the Telerik Data Access assemblies to the project, if they do not already exist.
  • Generates an .rlinq file that encapsulates the conceptual model.
  • Creates an App.Config or Web.Config file (depending on the project type).
  • Displays the domain model in the Telerik Data Access Visual Designer.