Where is the reference/documentation for the template language API?
It's great that templates are editable - I've already made a number of customizations. But without documentation it's all guesswork, trial and error.
In particular, I need documentation for EntityDeveloper.ContextModel and the EntityDeveloper.NHibernate namespace...
reference/documentation for template language API
T4 documentation:
- download http://www.devart.com/entitydeveloper/e ... eloper.chm and open the Common Concepts > Working with Templates section;
- general T4 reference, e.g. http://msdn.microsoft.com/en-us/library/bb126478.aspx .
There is no description of the EntityDeveloper.ContextModel and the EntityDeveloper.NHibernate namespaces in our documentation. But there is an IntelliSense feature in our T4 Editor. Also you can switch to the model in design time to read a description of a particular property in the Properties window.
- download http://www.devart.com/entitydeveloper/e ... eloper.chm and open the Common Concepts > Working with Templates section;
- general T4 reference, e.g. http://msdn.microsoft.com/en-us/library/bb126478.aspx .
There is no description of the EntityDeveloper.ContextModel and the EntityDeveloper.NHibernate namespaces in our documentation. But there is an IntelliSense feature in our T4 Editor. Also you can switch to the model in design time to read a description of a particular property in the Properties window.
On a related note, where is the "Validation.tmpl" file located?
In the standard template:
I'd like to customize this file - you did mention adding synchronization for the Validate Max Length property when using Model First, but that's not quite good enough for me; I don't want the duplication, I want the string length validation automatically added, by default...
In the standard template:
Code: Select all
We plan to implement this functionality but no timeframe.mindplay wrote:Design-time descriptions only seem to be available for some types/properties? For example, nothing happens when I hover over a local variables typed as HibernateClass...
We will include the following information in our Entity Developer documentation:mindplay wrote:On a related note, where is the "Validation.tmpl" file located?
Editing and Saving Validation Templates
By default, when the entity property validation mechanism is enabled, the validation template is included into the template.
If you need to edit the validation template, perform the following sequence of actions:
In the Template node of the Model Explorer area, right-click the template selected in Step 1 of the previous procedure and, from the drop-down menu, select Open.
In the code of the template, locate the following line: "include file="Validation.tmpl"".
Place the cursor on Validation.tmpl and press F12.
Copy the text of the validation template into a new file.
Make required change and save the file with the Validation.tmpl name into a location as described in the table below:
Usage Specifics: The validation template is used for a particular model generation template, which is not the same as the predefined template.
Where To Save: The validation template must be saved in the same folder as the model generation template.
Usage Specifics: The modified validation template is used for a particular model.
Where To Save: The validation template must be saved in the same folder as the model file. The name of the validation template file must be Validation.tmpl or MODELNAME.Validation.tmpl.
Usage Specifics: The modified validation template is used in all models, for all ORMs, etc.
Where To Save: The validation template must be saved in the Shared Templates folder.
We have changed the behaviour: the Validate Max Length Length attribute will be initialized after setting Length starting from the next build of Entity Developer. As a result, string length validation automatically will be added. We will post here when the corresponding build is available for download.mindplay wrote:you did mention adding synchronization for the Validate Max Length property when using Model First, but that's not quite good enough for me; I don't want the duplication, I want the string length validation automatically added, by default...
New build of Entity Developer 4.2.110 is available for download now!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23135 .
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23135 .