NPersistence Reference Guide
Specifies a composite primary key class that is mapped to multiple fields or properties of the entity.

The names of the fields or properties in the primary key class and the primary key fields or properties of the entity must correspond and their types must be the same.

Examples

CopyC#
Example:

[IdClass(com.acme.EmployeePK.class)]
[Entity]
public class Employee {
   [Id] String empName;
   [Id] Date birthDay;
   ...
}

Namespace: NPersistence
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)

Syntax

   
 C# 
public sealed class IdClass : Attribute

Members

         
 All Members  Constructors   Fields  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
IdClass()()()()
Initializes a new instance of the IdClass class
IdClass(Type)
Initializes a new instance of the IdClass class
Value
Primary key class///

Inheritance Hierarchy

System..::..Object
  System..::..Attribute
    NPersistence..::..IdClass

See Also