In ED 6.0.157, I am trying to minimize the number of output CS files generated from my model. I am using the Telerik Data Access ORM.
If I turn "File Per Class" to true, then I get about 100 class.cs files (one per table) and 100 class.metadatasource.cs files (also one per table). If I turn "File Per Class" to false, I am expecting one .cs file and one metadatasource.cs file, but instead the output folder contains no, as in 0/ZERO, files are generated.
So, is the "File Per Class" equal FALSE broken? Or, am I using it incorrectly?
But more importantly, what parameters can I use to get the minimum number of output files from ED?
Peter
File Per Class False Does Not Generate Code
Re: File Per Class False Does Not Generate Code
We cannot reproduce the problem at the moment.petercbaxter wrote:If I turn "File Per Class" to false, I am expecting one .cs file and one metadatasource.cs file, but instead the output folder contains no, as in 0/ZERO, files are generated.
The only file generated in this case is ModelName.Designer.cs (designed behaviour). Please move any entity on the diagram (it will be marked with asterisk as modified) and save it to run custom tool of the model. Is ModelName.Designer.cs generated in this case?
-
- Posts: 2
- Joined: Tue 10 Jan 2017 18:53
Re: File Per Class False Does Not Generate Code
Ok, I understand that the flag "OneFIlePerClass" is inconsistently implemented (or documented so that when it is TRUE, ED generates files with the pattern {class}.cs and when it is FALSE, it generates {MODEL}.Designer.cs.
So, the only options for controlling the number of files generated is to use the "OneFilePerClass" flag? Are there any other options? Additionally, is there a way to run a post-processing script so I can merge all the metadata files into one? (What I want is a single metadata file -- since noone looks at that) and individual class files.
Thank you for your help.
So, the only options for controlling the number of files generated is to use the "OneFilePerClass" flag? Are there any other options? Additionally, is there a way to run a post-processing script so I can merge all the metadata files into one? (What I want is a single metadata file -- since noone looks at that) and individual class files.
Thank you for your help.
Re: File Per Class False Does Not Generate Code
If File Per Class is set to False, all model classes with metadata information will be placed into a single file.petercbaxter wrote:Ok, I understand that the flag "OneFIlePerClass" is inconsistently implemented (or documented so that when it is TRUE, ED generates files with the pattern {class}.cs and when it is FALSE, it generates {MODEL}.Designer.cs.
Right click template in Model Explorer > Templates, select Copy to Model Folder. Now you can modify a predefined code generation template in a way you need.petercbaxter wrote:Additionally, is there a way to run a post-processing script so I can merge all the metadata files into one? (What I want is a single metadata file -- since noone looks at that) and individual class files.
Tips:
1) documentation: http://www.devart.com/entitydeveloper/e ... eloper.chm (download, right click > Unblock) > the "Template System Concepts" section
2) you can use IntelliSense feature in our T4 Editor (completion list appears when you type the '.' character)
3) decompiling C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.Common.dll and C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.Orm.Common.dll may help you to get acquainted with the needed classes and their functionality