Skip to main content

Entity Model

An entity model defines a relational data store’s schema in terms of entity classes and relationships between them. Entity classes are structured types that represent any real-world entities (persons, places, or things) in code. An entity model includes declarations of these classes and information on how they map to data store objects (also called mapping information).

An entity model allows you to:

  • Apply entity class declarations as conventional and validation rules when writing your entity-based code that manages or queries a data store’s relational data at design time;

  • Replicate a data store’s schema and use it with a session component to update the data store and validate its integrity at runtime.

Once added to a project, an entity model is considered a required part, as it acts as the contract between your entity-based code and data stores whose schema matches this entity model. Refer to this topic to learn how to design entity models using the ExpressEntityMapping Framework.