1. Introducing Elementary

Elementary is a an Object Relational Mapping framework that makes ORM capabilities extremely simple to use. It supports mappings via both Xml files and .NET Attributes.

All of the examples in this guide are available via download from the Adapdev website.

Note

Most of the examples use .NET Attributes. To see the same examples using Xml, please download the samples.

Important

In order for attribute-based programming to work properly, you must specify primary keys in your database. Elementary automatically detects these and uses it for its mappings. If you don't have primary keys defined, you'll want to use the Xml-based approach, which allows you to specify them.