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:
- Open the RLINQ file in the Visual Designer.
- Right-click onto the design surface, then select Show Model Settings.
- In the Model Settings dialog, navigate to the Code Generation Settings tab page.
- Change the "Generate Multiple Files" option, click OK to close the Model Settings dialog and save your RLINQ file.