Entity Developer incorporates a large number of innovative
features which makes it a perfect code generation tool even for the most demanding
developers. Using Entity Developer, you can fine-tune the code generation process
according to particular needs by flexibly using different types of new templates
that are shipped with the application.
Entity Developer code generation lets you use templates to generate source code
for ORM models. Entity Developer has a very flexible code generation system, based
on templates, written in T4-like Template Language.
It is much more convenient to use our templates in the model than usual T4 templates,
because Entity Developer manages the process of code re-generation (when text templates
are used, code is re-generated only when the template is saved or a specific button
is clicked). In other words, if a changed model is saved, its code is automatically
Note, that Entity Developer supports integration with Visual Studio refactoring
that enables renaming of model objects. For example, when renaming an entity, refactoring
will ensure that any references to that class are renamed across your solution.
Refactoring is performed when you save your project and is applicable to namespaces,
classes and complex types as well as their properties, enums and their members;
for LinqConnect and Entity Framework models it also applies to the context class
and its properties.
Entity Developer models can have a freely defined set of templates. This allows
generating non-connected code against different templates. The advantage of using
Entity Developer is that Entity Developer manages all actions related to code generation.
That is, all the templates are re-generated when the model is changed. The Model
Explorer window provides a convenient means for managing templates.
When developing a model that at certain moments can become invalid, you may disable
template generation by using the Enabled property of a model template.
Templates can be stored both within the model and in Entity Developer resources.
The advantages of the first approach are the following:
The advantage of the second approach is the following:
To add a template stored on the disk to the model, you should use the Add Existing
command in the editor.
The Entity Developer application contains the following predefined templates:
Code generation can be configured with the template properties, which are declared
with the property directive in the templates.
Properties declared in this way are then displayed in the properties window and
can be easily edited. In addition to standard properties of the property directive,
Entity Developer supports the definition of a group and description.
The standard T4 generator implements the IVsSingleFileGenerator interface and by
default generates one file per template. Entity Developer extends this behavior
using the Output class. Example: the entity-generating template generates one single
cs file that is included into the .tt file project item, which is not very convenient
in large projects.
All templates have the FilePerClass option as well as the EntitiesOutput and ContextOutput.
EntitiesOutput and ContextOutput provide a capability that slightly differs in Visual
Studio and in the stand-alone version, as described below.
If you are using Entity Developer as a Microsoft Visual Studio add-in, you can define
the project and project folder to store generated code for contexts and entities
of your model. In the Entity Developer stand-alone application, it is possible to
define folders, in which generated code for entities and contexts is to be stored.
This set of options makes the development of multilayer applications easier and
more convenient. For example, you can easily create the following structure of the
application by setting the following options.
All templates support the generation of .NET attributes that are defined through
a convenient dialog in the designer. In the designer, for example, you can define
the System.ComponentModel.DataAnnotation attributes that will be generated in your
At some stage, the capabilities of the existing templates might seem insufficient
and you may want to create new templates (based on the blank template) or to extend
the existing ones (for that purpose, you can use the Copy-to-model option when adding
a template or make the currently added template refer to a template in the resources).
Custom templates can be easily made shared using the "make shared" option.
This allows using custom templates in other models. Shared templates are displayed
in the Custom category and are stored in the C:\Program Files\Common Files\Devart\EntityDeveloper\Shared
Templates are created and edited with convenient editor, which provides context-sensitive
code completion, error check, syntax highlighting and other features to speed up
your work. All errors and warnings are automatically displayed in the Error List
window. The Error List displays an error or warning message and the error location.
You can easily navigate to the line that caused the error by double-clicking the
error in the Error List window. Thus you may find and fix template errors quickly
In custom templates you can use the following additional parameters with the PushOutputRedirection
function that can be called inside the template code:
At certain stage of development, the existing properties of model objects might
not be sufficient. Using Entity Developer you can extend the property lists for
objects in the model. These extended properties are either declared in the template,
or defined in the model, and then used in code generation. For example, you can
add the Generate property to every class and then exclude some classes from generated
code by changing the value of this property in the designer.
"I tried Entity Developer and it works much better than the built-in model generator."
Thesycon Systemsoftware & Consulting GmbH
You might be also interested in:
Entity Framework Support
ORM-enabled ADO.NET providers:
SQL Server management tools:
T4 Template Editor for Visual Studio: