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

How to: Generate Persistent Classes in a Single File

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.

By default Telerik Data Access generates persistent classes in separate files, i.e. a different file for each object of the domain model is generated. This topic demonstrates how to generate persistent classes in a single file.

When you create a new domain model, the "Generate Multiple Files" option in the Advanced Options Page of the Create New Domain Model Wizard allows you to generate the persistent classes either in separate files or in a single file. By default, the option is checked. That means that a different file for each domain class will be generated.

When you uncheck that option, all domain classes will be generated in a single file (EntitiesModel.cs).

Modifying the "Generate Multiple Files" Option After the Model Generation

After the domain model is already generated, the "Generate Multiple Files" option can be still changed. To do that:

  1. Open the RLINQ file in the Visual Designer.
  2. Right-click onto the design surface, then select Show Model Settings.
  3. In the Model Settings dialog, navigate to the Code Generation Settings tab page.
  4. Change the "Generate Multiple Files" option, click OK to close the Model Settings dialog and save your RLINQ file.