Model Template Types

This section describes the types of templates in Entity Developer.

 

ExpandedToggleIcon        Predefined Templates

Entity Developer includes a set of predefined templates. These templates cannot be edited, however, you can create custom templates (see below) based on predefined ones.

The following templates are added to the Entity Developer application by default:

Entity Framework:
oEntityObject – generates a strongly-typed ObjectContext class and persistence-aware classes;
oPOCO Entity – generates a strongly-typed ObjectContext class and classes with persistence ignorance;
oSelf-Tracking Entity – generates a strongly-typed ObjectContext class and self-tracking entity classes;
oDbContext – generates a strongly-typed DbContext class, persistence ignorant entity classes, and fluent mapping code for them;
oRepository and Unit of Work – generates Repositories and Unit of Work classes;
oData Annotations Metadata – generates Data Annotations metadata classes and decorate entity classes and properties with Data Annotations attributes that specify validation rules, data display settings, and define metadata for Windows Communication Foundation, Dynamic data, and WCF RIA Services;
oData Transfer Objects – generates Data Transfer Object (DTO) classes;
oWCF RIA Domain Service – generates a WCF RIA Services domain service class;
oMVC Controller – generates a ASP.NET MVC controller with data access code;
oMVC View Advanced – generates an ASP.NET MVC view based on Twitter Bootstrap.
Entity Framework Core:
oEF Core – generates classes for entities, enumerated types for enums, and it also generates fluent mapping for them;
oRepository and Unit of Work - generates Repositories and Unit of Work classes;
oData Annotations Metadata - generates Data Annotations metadata classes and decorating entity classes and properties with data annotation attributes;
oData Transfer Objects - generates Data Transfer Object (DTO) classes.
oMVC Controller - generates a ASP.NET MVC controller with data access code;
oMVC View Advanced - generates a ASP.NET MVC view based on Twitter Bootstrap.
LINQ to SQL:
oLINQ to SQL – generates a strongly-typed DataContext class and persistence-aware classes;
oPOCO Entities - generates a strongly-typed DataContext class and classes with persistence ignorance;
oLINQ to SQL for Windows Phone - generates a strongly-typed DataContext class and persistence-aware classes for Windows Phone applications;
oRepository and Unit of Work - generates Repositories and Unit of Work classes;
oData Annotations Metadata – generates Data Annotations metadata classes and decorate entity classes and properties with Data Annotations attributes that specify validation rules, data display settings, and define metadata for Windows Communication Foundation, Dynamic data, and WCF RIA Services;
oData Transfer Objects – generates Data Transfer Object (DTO) classes;
oWCF RIA Domain Service – generates a WCF RIA Services domain service class;
oMVC Controller - generates a ASP.NET MVC controller with data access code;
oMVC View Advanced - generates an ASP.NET MVC view based on Twitter Bootstrap.
NHibernate:
oNHibernate – generates NHibernate classes with XML mapping;
oFluent NHibernate – generates Fluent NHibernate Mapping classes;
oCastle ActiveRecord – generates Castle ActiveRecord classes;
oRepository and Unit of Work – generates Repositories and Unit of Work classes;
oData Annotations Metadata – generates Data Annotations metadata classes and decorate entity classes and properties with Data Annotations attributes that specify validation rules, data display settings, and define metadata for Windows Communication Foundation, Dynamic data, and WCF RIA Services;
oData Transfer Objects – generates Data Transfer Object (DTO) classes;
oMVC Controller – generates a ASP.NET MVC controller with data access code;
oMVC View Advanced – generates an ASP.NET MVC view based on Twitter Bootstrap.
Telerik Data Access:
oData Access – generates classes for entities and complex types, enumerated types for enums, and it also generates fluent mapping for them;
oRepository and Unit of Work - generates Repositories and Unit of Work classes;
oData Annotations Metadata - generates Data Annotations metadata classes and decorating entity classes and properties with data annotation attributes;
oData Transfer Objects - generates Data Transfer Object (DTO) classes.
oMVC Controller - generates a ASP.NET MVC controller with data access code;
oMVC View Advanced - generates a ASP.NET MVC view based on Twitter Bootstrap.

ExpandedToggleIcon        Custom Templates

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 a predefined one. To use the blank template as a basis, right-click the Templates node of the Model Explorer window and select the New Blank Template option of the context menu. To use a predefined template as a basis for a custom template, right-click the required template in the Templates node of the Model Explorer window and select the Copy to Model Folder option in the context menu. Unless shared, templates of this type can be used only for a particular model.

note Note

Prior to adding a predefined template with the Copy to Model Folder context menu option enabled, ensure that your model has been saved first. It is impossible to copy a template to an unsaved model.

Custom (or user-defined) templates can be easily made shared using the Make Shared context menu option. This allows using custom templates in other models. Shared templates are marked as Shared by the corresponding value of the Type property in the Properties window, and in the list of templates in the Add Template dialog box. Shared templates and are stored in the C:\Program Files\Common Files\Devart\EntityDeveloper\Shared Templates folder.

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.