IEntity.FindAssociated Method (EntityInstanceCollection, IAssociation, IFilterCollection, ILobSystemInstance)
Gets the external items that are associated with the specified source external items and association, filtered by the specified criteria.
Namespace: Microsoft.BusinessData.MetadataModel
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Function FindAssociated ( _
sourceEntityInstances As EntityInstanceCollection, _
association As IAssociation, _
filterCollection As IFilterCollection, _
lobSystemInstance As ILobSystemInstance _
) As IEntityInstanceEnumerator
'Usage
Dim instance As IEntity
Dim sourceEntityInstances As EntityInstanceCollection
Dim association As IAssociation
Dim filterCollection As IFilterCollection
Dim lobSystemInstance As ILobSystemInstance
Dim returnValue As IEntityInstanceEnumerator
returnValue = instance.FindAssociated(sourceEntityInstances, _
association, filterCollection, lobSystemInstance)
IEntityInstanceEnumerator FindAssociated(
EntityInstanceCollection sourceEntityInstances,
IAssociation association,
IFilterCollection filterCollection,
ILobSystemInstance lobSystemInstance
)
Parameters
sourceEntityInstances
Type: Microsoft.BusinessData.Runtime.EntityInstanceCollectionThe source instances.
association
Type: Microsoft.BusinessData.MetadataModel.IAssociationThe association to use.
filterCollection
Type: Microsoft.BusinessData.Runtime.IFilterCollectionThe filters to apply.
lobSystemInstance
Type: Microsoft.BusinessData.MetadataModel.ILobSystemInstanceThe external system instance.
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.