Condividi tramite


IEntity.BulkEnumerateAssociatedIds Method (EntityInstanceCollection, IAssociation, IFilterCollection, ILobSystemInstance)

Gets pairs of source identities and destination identity for existing associated external items with the specified filter collection.

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

Syntax

'Declaration
Function BulkEnumerateAssociatedIds ( _
    sourceEntityInstances As EntityInstanceCollection, _
    associatedIdEnumerator As IAssociation, _
    filters As IFilterCollection, _
    lsi As ILobSystemInstance _
) As IAssociatedIdSetEnumerator
'Usage
Dim instance As IEntity
Dim sourceEntityInstances As EntityInstanceCollection
Dim associatedIdEnumerator As IAssociation
Dim filters As IFilterCollection
Dim lsi As ILobSystemInstance
Dim returnValue As IAssociatedIdSetEnumerator

returnValue = instance.BulkEnumerateAssociatedIds(sourceEntityInstances, _
    associatedIdEnumerator, filters, _
    lsi)
IAssociatedIdSetEnumerator BulkEnumerateAssociatedIds(
    EntityInstanceCollection sourceEntityInstances,
    IAssociation associatedIdEnumerator,
    IFilterCollection filters,
    ILobSystemInstance lsi
)

Parameters

Return Value

Type: Microsoft.BusinessData.Runtime.IAssociatedIdSetEnumerator
Pairs of source identities and destination identity.

Remarks

The given association must be a BulkAssociatedIdEnumerator. This method requires one or more external instances with the same external content type as an input. This external content type can be a source or the destination of the given association. This method returns identities of the external instances that are associated with the given external items. For example, consider Customer and Order items in an external system, where the following items are related:

  • Customer1 is related to OrderA and OrderB.

  • Customer2 is related to OrderC.

  • Customer3 is related to OrderD and OrderE.

If Customer1 and Customer2 are given as the input, the result will contain the following pairs:

  • Customer1, OrderA

  • Customer1, OrderB

  • Customer2, OrderC

If OrderA and OrderE are given as the input, the result will contain the following pairs:

  • Customer1, OrderA

  • Customer3, OrderE

A BulkAssociatedIdEnumerator MethodInstance will accept only one type of external content type.

Note

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

BulkEnumerateAssociatedIds Overload

Microsoft.BusinessData.MetadataModel Namespace