Posted by Gerhard Stephan on January 28th, 2008
The NoPrimaryKeyFoundException will be thrown if the user tries to query an entity type which has no valid primary key defined by the PrimaryKey attribute. In case that you use a pre-defined base object like "AutoIncValueObject" or "ValueObject" this exception will never occure.
To solve this exception, include a property to your entity type which is tagged with the PrimaryKey attribute or use a pre-defined base class.
/// Interface that describes a person
public interface IPerson : IValueObject
/// Gets or sets the unique value object id.
/// <value>The unique value object id.</value>
new int? Id