Del via


Entity.GetRelatedEntities-metode

Gets the collection of related entity instances for the specified relationship.

Navneområde: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (i Microsoft.Xrm.Sdk.dll)

Syntaks

'Deklaration
Protected Overridable Function GetRelatedEntities(Of TEntity As Entity) ( _
    relationshipSchemaName As String, _
    primaryEntityRole As Nullable(Of EntityRole) _
) As IEnumerable(Of TEntity)
protected virtual IEnumerable<TEntity> GetRelatedEntities<TEntity> (
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole
) where TEntity : Entity

GenericParameters

  • TEntity
    Type: Entity. The type of the entity.

Parametre

  • relationshipSchemaName
    Type: Streng. The schema name of the relationship.
  • primaryEntityRole
    The role of the primary entity in the relationship (referenced or referencing).

Returværdi

Type: IEnumerable
The collection of related entity instances for the specified relationship.

Eksempel

GetRelatedEntities<CampaignResponse>("activity_pointer_campaignresponse", null);

Sikkerhed i tråd

Alle offentlige statiske (Shared i Visual Basic) medlemmer af denne type er trådsikret. Alle medlemmer af forekomsten er ikke garanteret trådsikkerhed.

Platforme

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows Server 2008,Windows Server 2012,Windows 7

Change History

Se også

Reference

Entity-klasse
Entity-medlemmer
Microsoft.Xrm.Sdk-navneområde

Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.