EntityExtensions.SetRelatedEntities<TEntity> Method (Entity, Relationship, IEnumerable<TEntity>)
Applies To: Dynamics CRM 2013
Modifies 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 void SetRelatedEntities<TEntity>(
this Entity entity,
Relationship relationship,
IEnumerable<TEntity> entities
)
where TEntity : Entity
public:
generic<typename TEntity>
where TEntity : Entity
[ExtensionAttribute]
static void SetRelatedEntities(
Entity^ entity,
Relationship^ relationship,
IEnumerable<TEntity>^ entities
)
static member SetRelatedEntities<'TEntity when 'TEntity : Entity> :
entity:Entity *
relationship:Relationship *
entities:IEnumerable<'TEntity> -> unit
<ExtensionAttribute>
Public Shared Sub SetRelatedEntities(Of TEntity As Entity) (
entity As Entity,
relationship As Relationship,
entities As IEnumerable(Of TEntity)
)
Parameters
entity
Type: Microsoft.Xrm.Sdk.EntityType: Entity. The entity instance.
relationship
Type: Microsoft.Xrm.Sdk.RelationshipType: Relationship. The relationship instance.
entities
Type: System.Collections.Generic.IEnumerable<TEntity>Type: IEnumerable<TEntity>. The collection of entity instances to be related.
Type Parameters
- TEntity
The type, where TEntity is an Entity.
Remarks
Extends the core SetRelatedEntities<TEntity> method.
See Also
SetRelatedEntities Overload
EntityExtensions Class
Microsoft.Xrm.Client Namespace
Return to top