Extending Entity Classes Generated by the Entity Data Model

The entity classes generated by the Entity Data Model's text template file are stored in the text template's associated .cs/vb file. They are partial classes that are subclasses of your project's ABusinessEntity. You can manually extend these generated classes by adding properties to the other half of the partial entity class generated by the MM .NET Business Layer Generator.

When using the MM .NET Business Layer Generator, if you have the Entity Framework and EDMX Generation checkboxes selected, it will generate partial entity classes that have no properties:

For example, in C#:

namespace OakLeaf.OrderSystem.BusinessEF
{
    /// <summary>
    /// Summary description for EmployeeEntity.
    /// </summary>
    public partial class EmployeeEntity : ABusinessEntity
    {
 
    }
}

And in VB .NET:

Namespace Entities
 
    Partial Public Class EmployeeEntity
 
 
 
    End Class
 
End Namespace

You can manually add properties to this half of the partial class to extend the entity generated by the Entity Data Model. Note also, that the Business Layer Generator automatically generates an entity object that is in the same namespace as defined in the Entity Data Model's Namespace property.


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 01/07/18
Comment or report problem with topic