Entity.GetRelatedEntities 方法
应用到: CRM 2015 on-prem, CRM Online
Gets the collection of related entity instances for the specified relationship.
命名空间: Microsoft.Xrm.Sdk
程序集: Microsoft.Xrm.Sdk (在 Microsoft.Xrm.Sdk.dll 中)
语法
声明
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.
参数
- relationshipSchemaName
Type: 字符串. The schema name of the relationship.
- primaryEntityRole
The role of the primary entity in the relationship (referenced or referencing).
返回值
Type: IEnumerable
The collection of related entity instances for the specified relationship.
示例
GetRelatedEntities<CampaignResponse>("activity_pointer_campaignresponse", null);
线程安全性
此类型的所有公共静态(Visual Basic 中的 Shared)成员都是线程安全成员。不保证任何实例成员是线程安全成员。
平台
开发平台
Windows Vista、Windows Server 2003 和
目标平台
Windows Vista,Windows XP
Change History
另请参阅
参考
Entity 类
Entity 成员
Microsoft.Xrm.Sdk 命名空间
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.