Code Generation Templates

Entity Developer offers a number of highly customizable C# and Visual Basic templates for different use cases. To simplify selecting templates for your specific needs we have divided our templates by software architecture layers. They are data access layer, domain layer, and presentation layer.

Presentation Level Templates

MVC Controller

This template is designed for generating an MVC controller with data access code. It allows you to configure the output location and namespace of the controller classes.

MVC View Advanced

This template is designed for generating MVC Views based on Twitter Bootstrap. MVC View Advanced template provides more advanced features than the standard MVC Scaffolding template. It supports such advanced features as sorting, filtering, and paging.

Domain Layer Templates

Data Transfer Objects

This template can generate both DTO classes and converter classes with extension methods for converting entities to DTO and vice versa. These converter classes are partial classes with partial methods that you can use to customize the conversion process. If generated converter classes are not suitable for you, you can disable their generation and use some third-party library, for example, AutoMapper, to convert objects.

Data Transfer Objects template contains a wide range of settings for configuring DTO and converter classes generation, their output namespace and location, naming, etc.

Data Annotations Metadata

This template is designed for generating Data Annotations metadata classes and decorating entity classes and properties with data annotation attributes that specify validation rules, specify how the data is displayed, and define metadata for Windows Communication Foundation (WCF), Dynamic Data and WCF RIA Services. For each model entity the template generates a partial class with an attribute, specifying a metadata class, and the metadata class itself.

WCF RIA Domain Service

This template is designed for generating a WCF RIA Services domain service class for an Entity Framework model. This template is not available for NHibernate ORM.

Data Access Layer Templates

Entity Framework Templates

DbContext

This template is designed for generating a strongly-typed DbContext class and persistence ignorant entity classes.

DbContext template can generate the following kinds of mapping: attribute mapping (for simple cases), fluent mapping in the OnModelCreating method, and fluent mapping in configuration classes. You may also disable mapping generation completely if default settings from user-defined conventions are enough for you.

DbContext template has a WCF Data Contract Attributes property for managing generation of DataContract, KnownType, and DataMember attributes for classes and properties. This template also can generate classes that implement INotifyPropertyChanged, and INotifyPropertyChanging interfaces.

Entity Object

This template is designed for generating a strongly-typed ObjectContext class and persistence-aware classes.

POCO Entity

This template is designed for generating a strongly-typed ObjectContext class and classes with persistence ignorance.

POCO Entity template has a WCF Data Contract Attributes property for managing generation of DataContract, KnownType, and DataMember attributes for classes and properties. This template also can generate classes that implement INotifyPropertyChanged, and INotifyPropertyChanging interfaces.

Repository and Unit of Work

This template is designed for generating code implementing Repositories and Unit of Work patterns for Entity Framework model. It allows you to completely separate working with entity classes from the actual data access code.

Self-Tracking Entity

This template is designed for generating a strongly-typed ObjectContext class and self-tracking entity classes.

NHibernate Templates

Castle ActiveRecord

This template is designed for implementing the Active Record design pattern. It generates Castle ActiveRecord implementation code.

Fluent NHibernate

This template is designed for generating fluent mapping code for an NHibernate models. It is used together with the NHibernate template.

NHibernate

This template is designed for generating NHibernate entities and .hbm.xml mapping files for them. However if you use this template together with Fluent NHibernate template, you may disable XML mapping generation.

Repository and Unit of Work

This template is designed for generating code implementing Repositories and Unit of Work patterns for NHibernate model. It allows you to completely separate working with entity classes from the actual data access code.

LinqConnect Templates

Fluent Mapping

This template is designed for generating a strongly-typed DataContext class, fluent mapping and classes with persistence ignorance. It is available in C# only.

LinqConnect

This template is designed for generating a strongly-typed DataContext class and persistence-aware classes.

POCO Entity

This template is designed for generating a strongly-typed DataContext class and classes with persistence ignorance.

Repository and Unit of Work

This template is designed for generating code implementing Repositories and Unit of Work patterns for LinqConnect model. It allows you to completely separate working with entity classes from the actual data access code.

LINQ to SQL Templates

LINQ to SQL

This template is designed for generating a strongly-typed DataContext class and persistence-aware classes.

LINQ to SQL for Windows Phone

This template is designed for generating a strongly-typed DataContext class and persistence-aware classes for Windows Phone applications.

POCO Entity

This template is designed for generating a strongly-typed DataContext class and classes with persistence ignorance.

Repository and Unit of Work

This template is designed for generating code implementing Repositories and Unit of Work patterns for LinqConnect model. It allows you to completely separate working with entity classes from the actual data access code.