IEntityInstance.GetAssociatedInstanceIdentity Method

Gets the identity of the External Item that is associated with this External Item via the given association.

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


Function GetAssociatedInstanceIdentity ( _
    association As IAssociation, _
    entity As IEntity _
) As Identity
Dim instance As IEntityInstance
Dim association As IAssociation
Dim entity As IEntity
Dim returnValue As Identity

returnValue = instance.GetAssociatedInstanceIdentity(association, _
Identity GetAssociatedInstanceIdentity(
    IAssociation association,
    IEntity entity


Return Value

Type: Microsoft.BusinessData.Runtime.Identity
The identity of the External Item.


This method will only return the identity if all the foreign identifier values are present in the data of this External Item. When one or more identifier values are not present, this method will return a null reference (Nothing in Visual Basic).

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


IEntityInstance Interface

IEntityInstance Members

Microsoft.BusinessData.Runtime Namespace