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

How to: Generate Classes in Project/File Folder

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.

During the development of large applications, you may need to improve the organization of the files in the solution. Telerik Data Access allows you to specify where to place the generated domain classes. You can choose whether to place them in an existing or newly created folder under the project folder, or somewhere on your local storage. With Telerik Data Access you can set the destination folder during either the creation of the domain model or on a later stage when you modify it.

The necessary settings can be found on the Code Generation Settings page in either the Advanced Options dialogue of the Create Model wizard or the Code Generation Settings tab in the Model Settings dialogue.

This topic will demonstrate to you how to control the domain class generation. The workflow includes the following steps:

  1. Navigate to the Advanced Options dialogue of the Create Model wizard or open the Code Generation Settings tab in Model Settings.
  2. In the Code Generation Options section select either Project Folder or File Folder radio-button

  3. Click on the corresponding Browse... button open either the Select Folder or Browse For Folder dialogue

  4. Navigate to the folder that will hold the domain classes (if it does not exist you can create it with the Add New Folder or Make New Folder button)

  5. Once the folder is selected close the dialogue and the path to the folder will be populated in the text box
  6. Click Finish if you are using the wizard or OK for Model Settings
  7. Save the domain model if you are using the Model Settings dialogue

For Project Folder the outcome should be similar to the one on the next screenshot:

If you have selected a folder on your local storage with the help of the File Folder option, it will not be included in your solution. You can verify that the classes are generated in Windows Explorer.

If you are restructuring your domain model, after generating the domain classes in the specified folder, you need to manually delete all files under the RLINQ file except the context and the diagram.