IEntityInstance.Disassociate Method (EntityInstanceCollection, IAssociation)
Removes the association between this External Item and the given External Items by using the given association.
Namespace: Microsoft.BusinessData.Runtime
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Sub Disassociate ( _
instances As EntityInstanceCollection, _
association As IAssociation _
)
'Usage
Dim instance As IEntityInstance
Dim instances As EntityInstanceCollection
Dim association As IAssociation
instance.Disassociate(instances, association)
void Disassociate(
EntityInstanceCollection instances,
IAssociation association
)
Parameters
instances
Type: Microsoft.BusinessData.Runtime.EntityInstanceCollectionThe External Items to remove association from this External Item. This collection must contain exactly on External Item for every source external content type of the given association.
association
Type: Microsoft.BusinessData.MetadataModel.IAssociationThe association.
Remarks
This method will reset the foreign identifier values on the External Item for the given association to their default values. 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 Disassociate() method. The given association must be a Disassociator or it must be in an AssociationGroup which contains a Disassociator.
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.