Export (0) Print
Expand All

AssociationAttribute Constructor

Initializes a new instance of the AssociationAttribute class.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public AssociationAttribute(
	string name,
	string thisKey,
	string otherKey
)

Parameters

name
Type: System.String
The name of the association. For bidirectional associations, the name must be the same on both sides of the association.
thisKey
Type: System.String
A comma-separated list of the property names of the key values on this side of the association.
otherKey
Type: System.String
A comma-separated list of the property names of the key values on the other side of the association.

When you apply an AssociationAttribute to a member in a WCF RIA Services solution, you must define the same number of keys on both sides of the relationship. If you do not provide the same number of keys to both sides of the relationship, you will receive an error when building the solution.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft