ORM

Abstracts

Object Relational Mapping (ORM) within this framework is the funcionality that maps the database table columns, represented by the Fields property of a data service object to data properties of a domain object model object.

Configuring mappings

The mapping is configured by setting the property ColumnPropertyMappings of the model object to an instance of Inetdev.Data.ColumnPropertyMappings class or a class that inherits from it.

Configuring using the application context

The application context that provides object factory and IoC, can be configured to provide this mappings in XML configuration files as in the following example:

                    
      <!-- Object: GroupMappings -->
      <object name="GroupMappings" singleton="true"
              type="Inetdev.Data.ColumnPropertyMappings, Inetdev.Data, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=856a2402e38a9992">
        <property name="Item">
          <map>
            <entry key="ID" value="Id"/>
            <entry key="PARTITION_KEY" value="PartitionKey"/>
            <entry key="NAME" value="Name"/>
            <entry key="TYPE" value="Type"/>
            <entry key="AUTHORITY" value="Authority"/>
          </map>
        </property>
      </object>
                    
                

Each <entry /> in the map contains the Field key and the value corresponds to the name of the data property in the data model object.

Top