Condividi tramite


IEntity.FindAssociated Method (EntityInstanceCollection, IAssociation, ILobSystemInstance)

Gets external items that are associated with the specified external items.

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

Syntax

'Declaration
Function FindAssociated ( _
    sourceEntityInstances As EntityInstanceCollection, _
    association As IAssociation, _
    lobSystemInstance As ILobSystemInstance _
) As IEntityInstanceEnumerator
'Usage
Dim instance As IEntity
Dim sourceEntityInstances As EntityInstanceCollection
Dim association As IAssociation
Dim lobSystemInstance As ILobSystemInstance
Dim returnValue As IEntityInstanceEnumerator

returnValue = instance.FindAssociated(sourceEntityInstances, _
    association, lobSystemInstance)
IEntityInstanceEnumerator FindAssociated(
    EntityInstanceCollection sourceEntityInstances,
    IAssociation association,
    ILobSystemInstance lobSystemInstance
)

Parameters

Return Value

Type: Microsoft.BusinessData.Runtime.IEntityInstanceEnumerator
An enumerator to the external items.

Remarks

The association provided as an input to this method must be an AssociationNavigator. FindAssociated requires an external item for every source external content type of the AssociationNavigator and will return external items based on the destination external content type of the AssociationNavigator that are associated with the given external items.

This method can potentially return a lot of external items. IFilterCollection can be specified to filter the results and optimize the behavior. For more information about how to use filters, see IFilterCollection.

This method returns an IEntityInstanceEnumerator, which requires special clean up and may expose additional functionality to control the behavior when the external system returns data in batches. For more information about how to use external item enumerators, see IEntityInstanceEnumerator.

The mode of operation can be specified for this method. For more information about how to use operation modes, see OperationMode.

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

IEntity Interface

IEntity Members

FindAssociated Overload

Microsoft.BusinessData.MetadataModel Namespace