IEntityInstance.Associate Method (EntityInstanceCollection, IAssociation)

Associates this External Item with the given External Items by using the given association.

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

Syntax

'Declaration
Sub Associate ( _
    instances As EntityInstanceCollection, _
    association As IAssociation _
)
'Usage
Dim instance As IEntityInstance
Dim instances As EntityInstanceCollection
Dim association As IAssociation

instance.Associate(instances, association)
void Associate(
    EntityInstanceCollection instances,
    IAssociation association
)

Parameters

Remarks

This method will set the foreign identifier values on the External Item based on the identifier values of the given External Items. To submit the change to the external system, Update method must be called. This method can only be used with foreign key based associations. For associations without a foreign key, use Associate() method. The given association must be an Associator or it must be in an AssociationGroup which contains an Associator.

Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.

Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.

See Also

Reference

IEntityInstance Interface

IEntityInstance Members

Associate Overload

Microsoft.BusinessData.Runtime Namespace