Share via


IAssociation Interface

Represents a relationship between two or more related external content types within external systems.

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

Syntax

'Declaration
Public Interface IAssociation _
    Inherits IMethodInstance, IAccessControlledMetadataObject, IMetadataObject, IMetadataStruct
'Usage
Dim instance As IAssociation
public interface IAssociation : IMethodInstance, 
    IAccessControlledMetadataObject, IMetadataObject, IMetadataStruct

Remarks

An association can have one or more sources and a single destination. For example, to obtain a list of Sales Orders, you may need to supply a Customer and a Sales Area. In this example, "Sales Orders" is the retrieved object, thus the destination. "Customer" and "Sales Area" are input objects, thus sources.

Foreign Key vs. Non-Foreign Key

Business Data Connectivity (BDC) service categorizes the associations with respect to how the association information is represented. You should be aware of this distinction, as each category requires different approaches when working with associations. Associations that are based on foreign keys store the relationship of external items within the data of one of these external items. Associations that are not based on foreign keys store the relationship information in a store external to both of these items. For example, consider a Customer item and an Order item. If the Order item contains an attribute which identifies the related Customer item, then this association is foreign-key based.

BDC distinguishes between these categories by the presence of a foreign identifier among the fields returned by the SpecificFinder MethodInstances of the external items.

Examples

Code Snippet: Execute the AssociationNavigator Method Instance of an External Content Type for an Association Without a Foreign Key

Code Snippet: Execute the Associator and Disassociator Method Instances of an External Content Type

Code Snippet: Execute the BulkAssociationNavigator Method Instance of an External Content Type

See Also

Reference

IAssociation Members

Microsoft.BusinessData.MetadataModel Namespace