Using the entity classes

All entity classes derive from a central, generated base class called CommonEntityBase. This class is the base class for all generated entity classes and it derives from the class EntityBase, which is located in the ORMSupportClasses assembly. The CommonEntityBase class is usable to add code (via a partial class or using the user code regions) to all generated entities without having to generate / add that code to all entity classes separately.

Differences between presets

When you generate code and you opt for the TwoClasses preset in combination of the SelfServicing template group you'll notice that there are actually two classes (hence the two class scenario) per entity which are used in a 'base class' - 'derived class' way. When you use the General preset, there is just one class, EntityNameEntity.cs/vb, which contains the same functionality as the EntityNameEntityBase.cs/vb class generated in the TwoClasses situation).

It's however recommended that if you're starting a new project and you want to use selfservicing, you use the General preset and partial classes as that will likely give you less generated code and the same flexibility.

Adding your own code to the generated classes for details on modifying the generated code.