EntityExtensions.GetRelatedEntities<TEntity, TResult> Method (Entity, Expression<Func<TEntity, IEnumerable<TResult>>>)
Applies To: Dynamics CRM 2013
Retrieves the collection of related entities for a specific relationship.
Namespace: Microsoft.Xrm.Client
Assembly: Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)
Syntax
public static IEnumerable<TResult> GetRelatedEntities<TEntity, TResult>(
this Entity entity,
Expression<Func<TEntity, IEnumerable<TResult>>> relationshipSelector
)
where TEntity : Entity
where TResult : Entity
public:
generic<typename TEntity, typename TResult>
where TEntity : Entity
where TResult : Entity
[ExtensionAttribute]
static IEnumerable<TResult>^ GetRelatedEntities(
Entity^ entity,
Expression<Func<TEntity, IEnumerable<TResult>^>^>^ relationshipSelector
)
static member GetRelatedEntities<'TEntity, 'TResult when 'TEntity : Entity when 'TResult : Entity> :
entity:Entity *
relationshipSelector:Expression<Func<'TEntity, IEnumerable<'TResult>>> -> IEnumerable<'TResult>
<ExtensionAttribute>
Public Shared Function GetRelatedEntities(Of TEntity As Entity, TResult As Entity) (
entity As Entity,
relationshipSelector As Expression(Of Func(Of TEntity, IEnumerable(Of TResult)))
) As IEnumerable(Of TResult)
Parameters
entity
Type: Microsoft.Xrm.Sdk.EntityType: Entity. The entity instance.
- relationshipSelector
Type: System.Linq.Expressions.Expression<Func<TEntity, IEnumerable<TResult>>>
Return Value
Type: System.Collections.Generic.IEnumerable<TResult>
Type: IEnumerable<Entity>
The collection of related entities for the relationship.
Type Parameters
- TEntity
The type, where TEntity is an Entity.
- TResult
Remarks
Extends the core GetRelatedEntities<TEntity> method.
See Also
GetRelatedEntities Overload
EntityExtensions Class
Microsoft.Xrm.Client Namespace
Return to top