EldorADO.NET Class Library

Eldorado.Object.Domain Namespace

[This is preliminary documentation and subject to change.]

Objects and their relationships are precisely described in a domain model.

Entities, domains and contexts

We call entity an object which encapsulates persistent data, stored in a database. In the simplest cases, there is one entity type per database table, one entity instance per table row.
Entities are clustered into domains (ObjectDomain). Domains can be organized hierarchically: one domain is the parent of another domain if at least one entity of the former references one or several entities of the latter. Cycles are forbidden in this case. A domain corresponds to the combination of category and a component in the UML model.
At the application level, operations upon entities occur inside a context (ObjectContext). The context manages an entity cache called the LocalStorage. Internally, the LocalStorage leverages an ADO.NET DataSet object. Entities can be viewed as simple strongly-typed facades in front of the DataRows contained in the DataSet.
The context guarantees the identity of the entities, i.e. to one DataRow instance corresponds at most one entity, whatever the way you get to this entity. This feature is provided by the Entity aspect.

Simple references, multiple references and associations

Entities can reference one another. A reference is a relationship oriented from one source entity to one or several target entities. The cardinality of a reference corresponds to the maximum possible number of target entities. When the cardinality is 1, we say it is a simple reference. Otherwise, the relationship is a multiple reference.
A reference has a name which corresponds to the role of the target entities inside the relationship.
A reference corresponds to a half-association of the UML model. Conversely, an association in the UML sense can be built out of two references, one being the main reference, or parent reference, the other being the back reference, or child reference.
At the database level, a reference generally corresponds to a foreign-key column or to an associative table.

Domains, entities, properties and references

  • There is one EntityData object per entity of an object domain (EntityInfos),
  • one PropertyData object per property of an entity (PropertyInfos),
  • one ReferenceData object per reference of an entity (ReferenceInfos).
  • EntityData objects serve as a repository of extensible services to describe the metadata of an entity. The GetService method is used to retrieve a particular service identified by its interface.

    PropertyData and ReferenceData operate in the same manner as regards properties and references.

    Namespace hierarchy


    ChildDomainCollection Collection of ChildDomain objects.
    EntityData The starting point for entity metadata.
    EntityDataCollection A collection of EntityData objects.
    ObjectDomain The object which describes the entities and their relationships.
    ObjectDomainBuilder Internal object used to build ObjectDomain objects.
    ObjectDomainCollection A collection of ObjectDomain objects.
    ObjectDomainSectionHandler Section Handler for the <objectDomains/> section in the config file: builds the ObjectDomain objects described in this section.
    PropertyData The starting point for property metadata.
    PropertyDataCollection A collection of PropertyData objects.
    ReferenceData The starting point for reference metadata.
    ReferenceDataCollection A collection of ReferenceData objects.


    IInverseReference An interface supported by mappers representing an inverse reference.
    IOidData The starting point for oid metadata.
    IPolymorphismManager Interface use by EntityData objects to manage polymorphism.
    IService Interface supported by EntityData, PropertyData and ReferenceData that need to be explicitly initialized.


    ChildDomainIObjectSource objects reference one root ObjectDomain object (property RootDomain) and optionally several child ObjectDomain objects (property ChildDomains). Child domains are domains that are referenced by the root domain and whose entities may take part in the queries performed over the IObjectSource.