Page 1 of 1
reference/documentation for template language API
Posted: Fri 16 Dec 2011 14:19
by mindplay
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...
Posted: Tue 20 Dec 2011 11:22
by Shalex
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.
Posted: Tue 20 Dec 2011 14:51
by mindplay
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...
Posted: Tue 20 Dec 2011 17:08
by mindplay
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...
Posted: Tue 20 Dec 2011 21:16
by mindplay
It's taking me hours to do even simple things here - I had to use reflection and throw exceptions with descriptions of properties and types to figure out the property structures... Please consider publishing the documentation for the API!
Posted: Fri 23 Dec 2011 10:58
by Shalex
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 plan to implement this functionality but no timeframe.
mindplay wrote:On a related note, where is the "Validation.tmpl" file located?
We will include the following information in our Entity Developer documentation:
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.
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...
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.
Posted: Thu 12 Jan 2012 16:38
by Shalex
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 .