Share via


ITypeDescriptor.GetAssociation Method

Returns the association that corresponds to the identifier referenced by this type descriptor.

Namespace:  Microsoft.BusinessData.MetadataModel
Assembly:  Microsoft.BusinessData (in Microsoft.BusinessData.dll)

Syntax

'Declaration
Function GetAssociation As IAssociation
'Usage
Dim instance As ITypeDescriptor
Dim returnValue As IAssociation

returnValue = instance.GetAssociation()
IAssociation GetAssociation()

Return Value

Type: Microsoft.BusinessData.MetadataModel.IAssociation
The association that corresponds to the referenced identifier.

Exceptions

Exception Condition
InvalidOperationException

The type descriptor does not reference an association. This condition can be checked through the IsAssociationSet property.

MetadataObjectNotFoundException

An association is referenced but could not be found.

Remarks

If the type descriptor references an association, then the identifier referenced by the type descriptor is a foreign identifier, used in the context of the association returned by this method or in the context of any other associations that are contained by the same association group. Type descriptors cannot reference associations if they do not refer to identifiers.

See Also

Reference

ITypeDescriptor Interface

ITypeDescriptor Members

Microsoft.BusinessData.MetadataModel Namespace