Introduction to BaseEntity is model driven framework. Generally, we can assume that model represents Business Entity. Example of such entity in Business could be Customer, Employee, Account, Address etc. Enterprise applications involves and revolves around these business entities. This also makes application micro service enables.

Why Model

  • When you use, Business Entity is represented by equivalent model. makes all REST end points available on that model. Using these end points, you can do basic CRUD operations on model.
  • You can define relations among models. There are various relation types available. (for example, hasOne, hasMany, belongsto etc)
  • You can add custom methods to model and that custom method can become end point (for example, BaseUser model has got Login end point)
  • These end points can be hosted in highly scalable environment and easily fit in micro service architecture
  • provides a way to create a model when application is running and you can start using the model right away without restarting application. This gives big scope for runtime authering of business functionality.

What is Model

  • Model represent business entity
  • It has got list of properties
  • Each property has got data type
  • It can have relations
  • it can have validations


BaseEntity is default Base Model of all the models created using framework. When you create such model, model inherits all the functionalities provided by BaseEntity. Below is list of such functionalities.

Functionality Description
Auditing Auditing Fields are added to model like _createdBy, _modifiedBy etc
History Every record’s history is maintained and kept in History table
Versioning Another word for pessimistic locking of the record. Before you delete or update record, you must pass version of the record
Validation Several types of validations are being supported including cross model validations. More is available in Guides
Date Personalization Data personalization enables you to personalize records for various different context like region, device, language etc
Service Personalization Service personalization enables you to retrieve records in various different ways according to context. More is available in Guide
Soft Delete Ensure that data is not hard deleted from storage

Below is example of list of properties that are inherited from BaseEntity

Base Property Description
_isDeleted A boolean flag indication whether an instance of this Model is (soft) deleted or not
_type A string property set to the current Model name
_createdBy A string property set to the name of the user who created an instance of this Model
_modifiedBy A string property set to the name of the user who last modified an instance of this Model
_createdOn A date property set to the date-time when an instance of this Model is created
_modifiedOn A date property set to the date-time when an instance of this Model was last modified
_version A string property that is set to a GUID, used as the version number of an instance of this Model

In all our guides, all models are derived from BaseEntity. Each guide will cover individual feature provided via BaseEntity.