Skip to main content
.NET Framework 4.6.2+

AssociationAttribute(String, Type) Constructor

Initializes a new instance of the AssociationAttribute class with the specified association name and type.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public AssociationAttribute(
    string name,
    Type elementType
)

Parameters

Name Type Description
name String

A String value which specifies the association name for the member. This value is assigned to the AssociationAttribute.Name property.

elementType Type

A Type descendant representing the type which is associated with the object on the opposite end of the association.

Remarks

There has to be a corresponding association attribute which has the same name as the association which represents the opposite side of the relationship. The association name must be unique among all the associations in the related classes and their descendants.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AssociationAttribute(String, Type) constructor.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also