One of the XAF's functions is managing a database via an ORM tool. Dealing with the database assumes that each object has a property that allows you to distinguish an object among other objects of the same type. In relational databases, such property is called a Unique key (primary key or a key). Each business class you create with an ORM tool must have a key property that will be used as a database unique key. Key property implementation differs, depending on the specific data access technology you use.
Entity Framework (EF)
When using EF, you can implement a key property by one of the following ways.
Implement a property named "Id"
Implement a property that combines the class name and "Id", such as "ContactId" (assuming that your class name is "Contact")
The DataView mode does not support business objects with composite keys in EF.
eXpress Persistent Objects (XPO)
In most XPO cases, you needn't be concerned with the key property, because usually it is already implemented in a class that is used as the base for your own XPO business class. Refer to the Base Persistent Classes article for more information about different base classes to inherit from and their key properties.