Share via


EntityExtensions.SetRelatedEntities<TEntity> Method (Entity, String, Nullable<EntityRole>, IEnumerable<TEntity>)

 

Applies To: Dynamics CRM 2015

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,
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity> entities
)
where TEntity : Entity
public:
generic<typename TEntity>
where TEntity : Entity
[ExtensionAttribute]
static void SetRelatedEntities(
    Entity^ entity,
    String^ relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity>^ entities
)
static member SetRelatedEntities<'TEntity when 'TEntity : Entity> : 
        entity:Entity *
        relationshipSchemaName:string *
        primaryEntityRole:Nullable<EntityRole> *
        entities:IEnumerable<'TEntity> -> unit
<ExtensionAttribute>
Public Shared Sub SetRelatedEntities(Of TEntity As Entity) (
    entity As Entity,
    relationshipSchemaName As String,
    primaryEntityRole As Nullable(Of EntityRole),
    entities As IEnumerable(Of TEntity)
)

Parameters

  • relationshipSchemaName
    Type: System.String

    Type: String. The schema name of the relationship.

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

© 2017 Microsoft. All rights reserved. Copyright